Skip to content

Commit eb68248

Browse files
committed
🤖 Remove unnecessary formatCompactionCommand wrapper
The deprecated function was just pointless indirection. Generated with `cmux`
1 parent 2295414 commit eb68248

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

src/components/CompactModal.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ const CompactModal: React.FC<CompactModalProps> = ({ isOpen, onClose, onCompact
100100
id="model"
101101
type="text"
102102
value={options.model ?? ""}
103-
onChange={(event) =>
104-
setOptions({ ...options, model: event.target.value || undefined })
105-
}
103+
onChange={(event) => setOptions({ ...options, model: event.target.value || undefined })}
106104
disabled={isLoading}
107105
placeholder="e.g., claude-3-5-sonnet-20241022"
108106
/>

src/utils/chatCommands.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ export function prepareCompactionMessage(options: CompactExecutionOptions): {
189189

190190
const metadata: CmuxFrontendMetadata = {
191191
type: "compaction-request",
192-
rawCommand: formatCompactionCommand(options),
192+
rawCommand: formatCompactCommand({
193+
maxOutputTokens: options.maxOutputTokens,
194+
model: options.model,
195+
continueMessage: options.continueMessage,
196+
}),
193197
parsed: compactData,
194198
};
195199

@@ -261,17 +265,7 @@ export function formatCompactCommand(
261265
return cmd;
262266
}
263267

264-
/**
265-
* Format compaction command string for display (accepts CompactExecutionOptions)
266-
* @deprecated Use formatCompactCommand with CompactOptions instead
267-
*/
268-
function formatCompactionCommand(options: CompactExecutionOptions): string {
269-
return formatCompactCommand({
270-
maxOutputTokens: options.maxOutputTokens,
271-
model: options.model,
272-
continueMessage: options.continueMessage,
273-
});
274-
}
268+
275269

276270
// ============================================================================
277271
// Command Handler Types

0 commit comments

Comments
 (0)