Skip to content

Commit 0e08afc

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

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
@@ -194,7 +194,11 @@ export function prepareCompactionMessage(options: CompactExecutionOptions): {
194194

195195
const metadata: CmuxFrontendMetadata = {
196196
type: "compaction-request",
197-
rawCommand: formatCompactionCommand(options),
197+
rawCommand: formatCompactCommand({
198+
maxOutputTokens: options.maxOutputTokens,
199+
model: options.model,
200+
continueMessage: options.continueMessage,
201+
}),
198202
parsed: compactData,
199203
};
200204

@@ -266,17 +270,7 @@ export function formatCompactCommand(
266270
return cmd;
267271
}
268272

269-
/**
270-
* Format compaction command string for display (accepts CompactExecutionOptions)
271-
* @deprecated Use formatCompactCommand with CompactOptions instead
272-
*/
273-
function formatCompactionCommand(options: CompactExecutionOptions): string {
274-
return formatCompactCommand({
275-
maxOutputTokens: options.maxOutputTokens,
276-
model: options.model,
277-
continueMessage: options.continueMessage,
278-
});
279-
}
273+
280274

281275
// ============================================================================
282276
// Command Handler Types

0 commit comments

Comments
 (0)