Skip to content

Commit 79d5abc

Browse files
committed
Revert "Add toggle open flag and tighten collapse spacing"
1 parent 286b381 commit 79d5abc

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

cli/src/chat.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export const App = ({
100100
requireAuth,
101101
hasInvalidCredentials,
102102
loadedAgentsData,
103-
initialToggleState,
104103
}: {
105104
initialPrompt: string | null
106105
agentId?: string
@@ -110,7 +109,6 @@ export const App = ({
110109
agents: Array<{ id: string; displayName: string }>
111110
agentsDir: string
112111
} | null
113-
initialToggleState: 'open' | 'closed' | null
114112
}) => {
115113
const renderer = useRenderer()
116114
const { width: measuredWidth } = useTerminalDimensions()
@@ -130,7 +128,6 @@ export const App = ({
130128

131129
const theme = chatTheme
132130
const markdownPalette = useMemo(() => createMarkdownPalette(theme), [theme])
133-
const shouldCollapseByDefault = initialToggleState !== 'open'
134131

135132
const [exitWarning, setExitWarning] = useState<string | null>(null)
136133
const exitArmedRef = useRef(false)
@@ -241,13 +238,11 @@ export const App = ({
241238
timestamp: new Date().toISOString(),
242239
}
243240

244-
// Set as collapsed by default unless forced open
245-
if (shouldCollapseByDefault) {
246-
setCollapsedAgents((prev) => new Set([...prev, agentListId]))
247-
}
241+
// Set as collapsed by default
242+
setCollapsedAgents((prev) => new Set([...prev, agentListId]))
248243
setMessages([initialMessage])
249244
}
250-
}, [loadedAgentsData, theme, shouldCollapseByDefault]) // Only run when loadedAgentsData changes
245+
}, [loadedAgentsData, theme]) // Only run when loadedAgentsData changes
251246

252247
const {
253248
inputValue,

cli/src/index.tsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ type ParsedArgs = {
3737
initialPrompt: string | null
3838
agent?: string
3939
clearLogs: boolean
40-
toggleState: 'open' | 'closed' | null
4140
}
4241

4342
function parseArgs(): ParsedArgs {
@@ -52,10 +51,6 @@ function parseArgs(): ParsedArgs {
5251
'Specify which agent to use (e.g., "base", "ask", "file-picker")',
5352
)
5453
.option('--clear-logs', 'Remove any existing CLI log files before starting')
55-
.option(
56-
'--toggle <state>',
57-
'Force initial toggle state (open | closed)',
58-
)
5954
.helpOption('-h, --help', 'Show this help message')
6055
.argument('[prompt...]', 'Initial prompt to send to the agent')
6156
.allowExcessArguments(true)
@@ -68,18 +63,10 @@ function parseArgs(): ParsedArgs {
6863
initialPrompt: args.length > 0 ? args.join(' ') : null,
6964
agent: options.agent,
7065
clearLogs: options.clearLogs || false,
71-
toggleState:
72-
typeof options.toggle === 'string'
73-
? options.toggle.trim().toLowerCase() === 'open'
74-
? 'open'
75-
: options.toggle.trim().toLowerCase() === 'closed'
76-
? 'closed'
77-
: null
78-
: null,
7966
}
8067
}
8168

82-
const { initialPrompt, agent, clearLogs, toggleState } = parseArgs()
69+
const { initialPrompt, agent, clearLogs } = parseArgs()
8370

8471
if (clearLogs) {
8572
clearLogFile()
@@ -135,7 +122,6 @@ const AppWithAsyncAuth = () => {
135122
requireAuth={requireAuth}
136123
hasInvalidCredentials={hasInvalidCredentials}
137124
loadedAgentsData={loadedAgentsData}
138-
initialToggleState={toggleState}
139125
/>
140126
)
141127
}

0 commit comments

Comments
 (0)