refactor(store): replace project and skill models with generated models
Some checks failed
CI / build-and-test (push) Failing after -31m25s
Some checks failed
CI / build-and-test (push) Failing after -31m25s
* Update project creation and retrieval to use generated models * Modify skill addition and listing to utilize generated models * Refactor thought handling to incorporate generated models * Adjust tool annotations to align with new model structure * Update API calls in the UI to use new ResolveSpec-based endpoints * Enhance stats retrieval logic to aggregate thought metadata
This commit is contained in:
@@ -3,6 +3,8 @@ package store
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"git.warky.dev/wdevs/amcs/internal/generatedmodels"
|
||||
)
|
||||
|
||||
func (db *DB) UpsertToolAnnotation(ctx context.Context, toolName, notes string) error {
|
||||
@@ -28,11 +30,11 @@ func (db *DB) GetToolAnnotations(ctx context.Context) (map[string]string, error)
|
||||
|
||||
annotations := make(map[string]string)
|
||||
for rows.Next() {
|
||||
var toolName, notes string
|
||||
if err := rows.Scan(&toolName, ¬es); err != nil {
|
||||
var model generatedmodels.ModelPublicToolAnnotations
|
||||
if err := rows.Scan(&model.ToolName, &model.Notes); err != nil {
|
||||
return nil, fmt.Errorf("scan tool annotation: %w", err)
|
||||
}
|
||||
annotations[toolName] = notes
|
||||
annotations[model.ToolName.String()] = model.Notes.String()
|
||||
}
|
||||
return annotations, rows.Err()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user