Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
27 lines
830 B
Go
27 lines
830 B
Go
package agenthost
|
|
|
|
import (
|
|
"testing"
|
|
|
|
storesqlite "github.com/tutti-os/tutti/packages/agent/store-sqlite"
|
|
)
|
|
|
|
func TestEditRetryReplacementInputPreservesSubmissionMetadata(t *testing.T) {
|
|
input, err := editRetryReplacementInput(storesqlite.TurnSubmission{
|
|
ContentJSON: `[{"type":"text","text":"before"}]`,
|
|
CapabilityRefsJSON: `[]`,
|
|
TuttiModeSnapshotJSON: `null`,
|
|
MetadataJSON: `{"uiMode":"agent"}`,
|
|
}, "after")
|
|
if err != nil {
|
|
t.Fatalf("editRetryReplacementInput() error=%v", err)
|
|
}
|
|
if input.Metadata["uiMode"] != "agent" {
|
|
t.Fatalf("metadata=%#v, want submission uiMode", input.Metadata)
|
|
}
|
|
claimMetadata, err := submitClaimMetadataJSON(input.Metadata)
|
|
if err != nil || claimMetadata != `{"uiMode":"agent"}` {
|
|
t.Fatalf("replacement claim metadata=%q err=%v", claimMetadata, err)
|
|
}
|
|
}
|