refactor(store): replace project and skill models with generated models
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:
2026-04-26 12:56:32 +02:00
parent da7220ad64
commit db7b152852
53 changed files with 3638 additions and 426 deletions

View File

@@ -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, &notes); 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()
}