Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions ai/agent/copilot_routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@ func (a *CopilotAgent) persistRoutingState(ctx context.Context, taskCtx *TaskCon
}
}

func (a *CopilotAgent) tryPathStyleRouting(ctx context.Context, query string) *TaskContextClassification {

log.Info("Path-Style Routing Activated", "path_query", query)
taskCtx := buildFocusedFallbackTaskContext("Omni", SpacesDomain, query)
taskCtx.RoutingGate = RoutingGateFocused
annotateTaskContextIntent(taskCtx, query)
a.persistRoutingState(ctx, taskCtx)
return taskCtx
}

func (a *CopilotAgent) tryPrefixBasedRouting(ctx context.Context, query string, gen ai.Generator, isTest bool, anchor *routingAnchor) (*TaskContextClassification, error) {
if anchor == nil {
return nil, nil
Expand Down
33 changes: 0 additions & 33 deletions ai/agent/copilottools.go
Original file line number Diff line number Diff line change
Expand Up @@ -598,39 +598,6 @@ func normalizeToolResultPayload(result string) json.RawMessage {
return json.RawMessage(strconv.Quote(result))
}

func (a *CopilotAgent) toolSwitchDatabase(ctx context.Context, args map[string]any) (string, error) {
dbName, _ := args["database"].(string)
if dbName == "" {
return "", fmt.Errorf("argument 'database' is required")
}

exists := false
if dbName == "system" && a.systemDB != nil {
exists = true
} else {
_, exists = a.databases[dbName]
}

if !exists {
var names []string
for k := range a.databases {
names = append(names, k)
}
if a.systemDB != nil {
names = append(names, "system")
}
sort.Strings(names)
return "", fmt.Errorf("database '%s' not found. Available: %v", dbName, names)
}

if p := ai.GetSessionPayload(ctx); p != nil {
p.CurrentDB = dbName
p.Transaction = nil
}

return fmt.Sprintf("Active database context switched to '%s'.", dbName), nil
}

// toolConcludeTopic is a placeholder. The actual logic requires Session access and is handled/overridden in Service.
func (a *CopilotAgent) toolConcludeTopic(ctx context.Context, args map[string]interface{}) (string, error) {
return "Topic concluded.", nil
Expand Down
Loading