语义摘要、变更叙事和 U9 分段改为请求 reasoning。该 profile 的 argv 使用 --no-tools 且不加载搜索扩展;未知 profile 拒绝启动。文档生成仍保留读写工具。 Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
934 B
Go
32 lines
934 B
Go
package agent
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"chat-agent-system/internal/config"
|
|
)
|
|
|
|
func TestRunnerPayload_ReasoningDoesNotBecomeWorkspace(t *testing.T) {
|
|
p := &PiAgentBackend{cfg: &config.Config{PiAgentModel: "MiniMax-M3", PiAgentProvider: "minimax"}}
|
|
body := p.runnerPayload(Request{
|
|
Prompt: "summarize",
|
|
Targets: []string{"shadow.md"},
|
|
ToolProfile: ToolProfileReasoning,
|
|
}, "/tmp/ws", true, time.Second)
|
|
if body["tool_profile"] != ToolProfileReasoning {
|
|
t.Fatalf("tool_profile = %v", body["tool_profile"])
|
|
}
|
|
if body["typed_result"] != true {
|
|
t.Fatal("remote payload must keep typed_result")
|
|
}
|
|
|
|
local := p.runnerPayload(Request{Targets: []string{"output.md"}}, "/tmp/ws", false, 0)
|
|
if local["tool_profile"] != ToolProfileWorkspace {
|
|
t.Fatalf("empty profile = %v", local["tool_profile"])
|
|
}
|
|
if _, ok := local["typed_result"]; ok {
|
|
t.Fatal("local bridge payload must not switch to typed_result")
|
|
}
|
|
}
|