返回 DeepSeek-Reasonix
unapplied_steer_history_test.go
根目录 / desktop / unapplied_steer_history_test.go
1 package main
2
3 import (
4 "testing"
5
6 "reasonix/internal/event"
7 "reasonix/internal/provider"
8 )
9
10 func TestHistoryMessagesUnappliedSteerKeepsMessageIdentity(t *testing.T) {
11 const content = "[Mid-turn steer queued by the user. Do not treat this as a new task; use it only as additional guidance for the current task after completing the current step.]\nUse plan B"
12 rows := historyMessages([]provider.Message{{ID: "queued", Role: provider.RoleTool, Content: content,
13 ToolCallID: provider.LocalOnlyToolID, Name: provider.LocalOnlyToolName, LocalOnly: true}}, func(text string) string { return text })
14 if len(rows) != 1 || rows[0].Role != "notice" || rows[0].MessageID != "queued" || rows[0].Code != event.NoticeCodeUnappliedSteer {
15 t.Fatalf("unapplied steer history identity = %+v", rows)
16 }
17 }
18
18 lines GO