Skip to content

Commit 2ab2907

Browse files
committed
Revert "Disable mode switching for the moment (max not much better than default. plan is bugged)"
This reverts commit a8bf349.
1 parent c6d7a32 commit 2ab2907

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

cli/src/components/chat-input-bar.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ interface ChatInputBarProps {
4949

5050
// Feedback mode
5151
feedbackMode: boolean
52-
handleExitFeedback: () => void // Handlers
52+
handleExitFeedback: () => void // Handlers
5353
handleSubmit: () => Promise<void>
5454
}
5555

@@ -197,8 +197,7 @@ export const ChatInputBar = ({
197197
cursorPosition={cursorPosition}
198198
/>
199199
</box>
200-
{/* Mode switcher temporarily disabled */}
201-
{/* {!isBashMode && (
200+
{!isBashMode && (
202201
<box
203202
style={{
204203
flexShrink: 0,
@@ -211,7 +210,7 @@ export const ChatInputBar = ({
211210
onSelectMode={setAgentMode}
212211
/>
213212
</box>
214-
)} */}
213+
)}
215214
</box>
216215
</box>
217216
</box>

cli/src/hooks/use-chat-input.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ export const useChatInput = ({
2929
const hasAutoSubmittedRef = useRef(false)
3030
const isBashMode = useChatStore((state) => state.isBashMode)
3131

32-
// // Estimate the collapsed toggle width as rendered by AgentModeToggle.
33-
// // In bash mode, we don't show the toggle, so no width needed.
34-
// const estimatedToggleWidth = isBashMode
35-
// ? 0
36-
// : stringWidth(`< ${agentMode}`) + 6 // 2 padding + 2 borders + 2 gap
37-
const estimatedToggleWidth = 0
32+
// Estimate the collapsed toggle width as rendered by AgentModeToggle.
33+
// In bash mode, we don't show the toggle, so no width needed.
34+
const estimatedToggleWidth = isBashMode
35+
? 0
36+
: stringWidth(`< ${agentMode}`) + 6 // 2 padding + 2 borders + 2 gap
3837

3938
// The content box that wraps the input row has paddingLeft/paddingRight = 1
4039
// (see cli/src/chat.tsx). Subtract those columns so our MultilineInput width

0 commit comments

Comments
 (0)