Remove obsolete pipeline files

This commit is contained in:
lpf
2026-03-06 17:45:43 +08:00
parent 7d9ca89476
commit ad7316c9b6
5 changed files with 0 additions and 1238 deletions

View File

@@ -1,44 +0,0 @@
package agent
import "testing"
func TestWithToolContextArgsPipelineAutoInject(t *testing.T) {
args := map[string]interface{}{
"objective": "build feature",
}
got := withToolContextArgs("pipeline_create", args, "telegram", "123")
if got["channel"] != "telegram" {
t.Fatalf("expected channel auto-injected for pipeline_create, got %v", got["channel"])
}
if got["chat_id"] != "123" {
t.Fatalf("expected chat_id auto-injected for pipeline_create, got %v", got["chat_id"])
}
}
func TestWithToolContextArgsPipelineRespectsExplicitTarget(t *testing.T) {
args := map[string]interface{}{
"pipeline_id": "p-1",
"channel": "webui",
"chat_id": "panel",
}
got := withToolContextArgs("pipeline_dispatch", args, "telegram", "123")
if got["channel"] != "webui" {
t.Fatalf("expected explicit channel preserved, got %v", got["channel"])
}
if got["chat_id"] != "panel" {
t.Fatalf("expected explicit chat_id preserved, got %v", got["chat_id"])
}
}
func TestWithToolContextArgsIgnoresUnrelatedTools(t *testing.T) {
args := map[string]interface{}{
"path": "README.md",
}
got := withToolContextArgs("read_file", args, "telegram", "123")
if _, ok := got["channel"]; ok {
t.Fatalf("did not expect channel for unrelated tool")
}
if _, ok := got["chat_id"]; ok {
t.Fatalf("did not expect chat_id for unrelated tool")
}
}