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:
@@ -242,6 +242,7 @@ type SuggestedQuestion struct {
|
||||
type SuggestedQuestionsRequest struct {
|
||||
KnowledgeBaseIDs []string // Optional: override agent's KB scope
|
||||
KnowledgeIDs []string // Optional: limit to specific knowledge items
|
||||
TagIDs []string // Optional: limit to knowledge items under these tags
|
||||
Limit int // Optional: max questions to return (default 6)
|
||||
}
|
||||
|
||||
@@ -269,6 +270,9 @@ func (c *Client) GetSuggestedQuestions(ctx context.Context, agentID string, requ
|
||||
if len(request.KnowledgeIDs) > 0 {
|
||||
query.Set("knowledge_ids", strings.Join(request.KnowledgeIDs, ","))
|
||||
}
|
||||
if len(request.TagIDs) > 0 {
|
||||
query.Set("tag_ids", strings.Join(request.TagIDs, ","))
|
||||
}
|
||||
if request.Limit > 0 {
|
||||
query.Set("limit", strconv.Itoa(request.Limit))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user