From 47069db2af71633fc798209b2d57b78f35a67cec Mon Sep 17 00:00:00 2001 From: seagochen Date: Mon, 9 Mar 2026 16:35:16 +0800 Subject: [PATCH] test(agent): remove obsolete TestHandleExtensionCommand_EmojiPassthrough MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/agent/loop_test.go | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/pkg/agent/loop_test.go b/pkg/agent/loop_test.go index 577323842..cdf2bacda 100644 --- a/pkg/agent/loop_test.go +++ b/pkg/agent/loop_test.go @@ -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) { tmpDir, err := os.MkdirTemp("", "agent-test-*")