MCPcopy Create free account
hub / github.com/aurora-develop/aurora / TestFinalNudgeForUserTurn

Function TestFinalNudgeForUserTurn

internal/toolcall/parser_test.go:427–444  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

425}
426
427func TestFinalNudgeForUserTurn(t *testing.T) {
428 tools := []official.Tool{
429 {Type: "function", Function: official.ToolFunction{Name: "bash"}},
430 }
431 msgs := []official.APIMessage{
432 {Role: "user", Content: official.MessageContent{TextValue: "Working directory: /home/x\n列出文件"}},
433 }
434 got := FinalNudge(tools, msgs)
435 if got == "" {
436 t.Fatalf("got empty")
437 }
438 if !strings.Contains(got, "working directory: /home/x") {
439 t.Fatalf("missing wd: %s", got)
440 }
441 if !strings.Contains(got, `"bash"`) {
442 t.Fatalf("missing example: %s", got)
443 }
444}
445
446func TestFinalNudgeEmptyForOtherRole(t *testing.T) {
447 tools := []official.Tool{

Callers

nothing calls this directly

Calls 1

FinalNudgeFunction · 0.85

Tested by

no test coverage detected