MCPcopy Create free account
hub / github.com/tiann/hapi / filterResumeSubcommand

Function filterResumeSubcommand

cli/src/codex/codexLocal.ts:18–31  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

16 * Codex CLI format is `codex resume <session-id>`, so subcommand is always first.
17 */
18export function filterResumeSubcommand(args: string[]): string[] {
19 if (args.length === 0 || args[0] !== 'resume') {
20 return args;
21 }
22
23 // First arg is 'resume', filter it and optional session ID
24 if (args.length > 1 && !args[1].startsWith('-')) {
25 logger.debug(`[CodexLocal] Filtered 'resume ${args[1]}' - session managed by hapi`);
26 return args.slice(2);
27 }
28
29 logger.debug(`[CodexLocal] Filtered 'resume' - session managed by hapi`);
30 return args.slice(1);
31}
32
33export async function codexLocal(opts: {
34 abort: AbortSignal;

Callers 2

codexLocal.test.tsFile · 0.90
codexLocalFunction · 0.70

Calls 1

debugMethod · 0.80

Tested by

no test coverage detected