feat(chat): add @Skill/@MCP mentions with scoped agent runtime
Wire per-turn @mentions for skills, MCP services, tags, and files through QA handlers into agent config, runtime_context/must_use user blocks, and tool registration. Fix tag-only scopes dropping KB tools, refresh suggested questions on mention changes, and strengthen MCP must_use so @selected services are invoked before local KB search.
This commit is contained in:
@@ -31,17 +31,7 @@ func (e *AgentEngine) streamFinalAnswerToEventBus(
|
||||
})
|
||||
|
||||
// Build messages with all context
|
||||
language := types.LanguageNameFromContext(ctx)
|
||||
systemPrompt := BuildSystemPromptWithOptions(
|
||||
e.knowledgeBasesInfo,
|
||||
e.config.WebSearchEnabled,
|
||||
e.selectedDocs,
|
||||
&BuildSystemPromptOptions{
|
||||
Language: language,
|
||||
Config: e.appConfig,
|
||||
},
|
||||
e.systemPromptTemplate,
|
||||
)
|
||||
systemPrompt := e.buildSystemPrompt(ctx)
|
||||
|
||||
messages := []chat.Message{
|
||||
{Role: "system", Content: systemPrompt},
|
||||
|
||||
Reference in New Issue
Block a user