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
13 changes: 0 additions & 13 deletions ai/agent/api_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package agent

import (
"context"
"encoding/json"
"fmt"
)

Expand Down Expand Up @@ -153,15 +152,3 @@ func (a *CopilotAgent) Join(ctx context.Context, args JoinArgs) (string, error)
}
return formatToolResult(ctx, res)
}

// Helper to convert map to struct (for adapters)
func mapToStruct(input map[string]any, output any) error {
bytes, err := json.Marshal(input)
if err != nil {
return fmt.Errorf("marshal failed: %w", err)
}
if err := json.Unmarshal(bytes, output); err != nil {
return fmt.Errorf("unmarshal failed: %w", err)
}
return nil
}
10 changes: 0 additions & 10 deletions ai/agent/api_space.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package agent

import (
"context"
"encoding/json"
"fmt"

"github.com/sharedcode/joltrin"
Expand Down Expand Up @@ -416,12 +415,3 @@ func (a *CopilotAgent) SearchItemsByPath(ctx context.Context, args SearchItemsBy
}
return items, nil
}

// Helper to convert struct to JSON string for backward compatibility
func spaceResultToJSON(v any) (string, error) {
b, err := json.Marshal(v)
if err != nil {
return "", err
}
return string(b), nil
}
Loading