Run tasks directly with language-independent project tools
This commit is contained in:
@@ -33,12 +33,12 @@ func TestStageToolsVisible(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunConfirmationShowsStageScopedTools(t *testing.T) {
|
||||
func TestRunComposerShowsStageScopedTools(t *testing.T) {
|
||||
m := panelModel(t)
|
||||
m.runForm = 3
|
||||
m.runForm = 1
|
||||
m.runInput = newInput()
|
||||
m.detail.Graph.Stages[0].Blocks["tools"] = "websearch\nwebfetch"
|
||||
if m.runToolApproval() {
|
||||
if m.runHasMutationTools() {
|
||||
t.Fatal("web stage requires mutation approval")
|
||||
}
|
||||
view := m.runFormView(40)
|
||||
@@ -46,12 +46,12 @@ func TestRunConfirmationShowsStageScopedTools(t *testing.T) {
|
||||
t.Fatal("incorrect web confirmation", view)
|
||||
}
|
||||
m.detail.Graph.Stages[0].Blocks["tools"] = "shell"
|
||||
if !m.runToolApproval() {
|
||||
if !m.runHasMutationTools() {
|
||||
t.Fatal("shell cannot be approved without edits")
|
||||
}
|
||||
view = m.runFormView(40)
|
||||
if !strings.Contains(view, "RUN approves scoped shell/edit") {
|
||||
t.Fatal("shell approval is not explicit", view)
|
||||
if !strings.Contains(view, "shell") || strings.Contains(view, "RUN approves") {
|
||||
t.Fatal("composer should show tools, not demand approval", view)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestNativeNtfyStagePresentation(t *testing.T) {
|
||||
if strings.Contains(header, "PROMPT") || !strings.Contains(view, "ntfy") || !strings.Contains(view, "anime") {
|
||||
t.Fatal("native stage displayed as model", view)
|
||||
}
|
||||
m.runForm = 3
|
||||
m.runForm = 1
|
||||
m.runInput = newInput()
|
||||
view = m.runFormView(40)
|
||||
if !strings.Contains(view, "publish Markdown to ntfy destination anime") {
|
||||
|
||||
Reference in New Issue
Block a user