diff --git a/ai/agent/copilot_routing.go b/ai/agent/copilot_routing.go index 70d79c37d..18fdbffe9 100644 --- a/ai/agent/copilot_routing.go +++ b/ai/agent/copilot_routing.go @@ -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 diff --git a/ai/agent/copilottools.go b/ai/agent/copilottools.go index 9985fc550..4729bfc13 100644 --- a/ai/agent/copilottools.go +++ b/ai/agent/copilottools.go @@ -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