Refactored orchestrator for staged file handling, added structured prompt support, adjusted Feishu file handling

This commit is contained in:
whlaoding
2026-03-08 22:38:29 +08:00
parent e2f806edb3
commit 52b8dbb835
30 changed files with 9325 additions and 34 deletions

View File

@@ -40,3 +40,27 @@ func TestCallWindowsDateIsNonInteractive(t *testing.T) {
t.Fatal("expected non-empty output for date command")
}
}
func TestRequiresShellParsing(t *testing.T) {
if !requiresShellParsing("echo hi | cat") {
t.Fatal("expected pipe command to require shell parsing")
}
if requiresShellParsing("echo hello") {
t.Fatal("expected simple command to not require shell parsing")
}
}
func TestCallSupportsPipeOnUnix(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("unix-only behavior test")
}
tool := New([]string{"echo"}, ".", 3*time.Second, 4000, nil)
out, err := tool.Call(context.Background(), "printf hello | wc -c")
if err != nil {
t.Fatalf("expected pipeline command success, got err=%v output=%q", err, out)
}
trimmed := strings.TrimSpace(out)
if trimmed != "5" {
t.Fatalf("expected output 5, got %q", trimmed)
}
}