test(agent): remove obsolete TestHandleExtensionCommand_EmojiPassthrough
handleExtensionCommand was removed in the : → / prefix refactor. The tested behavior (:help, :usage) is now handled by the command registry. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a2bb4c7704
commit
47069db2af
1 changed files with 0 additions and 33 deletions
|
|
@ -871,39 +871,6 @@ func TestHandleCdCommand_SymlinkEscape(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestHandleExtensionCommand_EmojiPassthrough verifies that emoji-like
|
|
||||||
// messages starting with : are not intercepted as commands.
|
|
||||||
func TestHandleExtensionCommand_EmojiPassthrough(t *testing.T) {
|
|
||||||
cfg := &config.Config{
|
|
||||||
Agents: config.AgentsConfig{
|
|
||||||
Defaults: config.AgentDefaults{
|
|
||||||
Workspace: t.TempDir(),
|
|
||||||
Model: "test-model",
|
|
||||||
MaxTokens: 4096,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
msgBus := bus.NewMessageBus()
|
|
||||||
provider := &mockProvider{}
|
|
||||||
al := NewAgentLoop(cfg, msgBus, provider)
|
|
||||||
|
|
||||||
emojiInputs := []string{":)", ":D", ":heart:", ":thinking:", ":-)", ":100:"}
|
|
||||||
for _, input := range emojiInputs {
|
|
||||||
_, handled := al.handleExtensionCommand(input)
|
|
||||||
if handled {
|
|
||||||
t.Errorf("Expected %q to pass through (not handled), but it was handled", input)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Known commands should still be handled
|
|
||||||
knownCommands := []string{":help", ":usage"}
|
|
||||||
for _, cmd := range knownCommands {
|
|
||||||
_, handled := al.handleExtensionCommand(cmd)
|
|
||||||
if !handled {
|
|
||||||
t.Errorf("Expected %q to be handled, but it was not", cmd)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestTargetReasoningChannelID_AllChannels(t *testing.T) {
|
func TestTargetReasoningChannelID_AllChannels(t *testing.T) {
|
||||||
tmpDir, err := os.MkdirTemp("", "agent-test-*")
|
tmpDir, err := os.MkdirTemp("", "agent-test-*")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue