| 6 | * Cursor CLI format: `agent resume` or `agent resume <chatId>` |
| 7 | */ |
| 8 | export function filterResumeSubcommand(args: string[]): string[] { |
| 9 | if (args.length === 0 || args[0] !== 'resume') { |
| 10 | return args; |
| 11 | } |
| 12 | |
| 13 | if (args.length > 1 && !args[1].startsWith('-')) { |
| 14 | logger.debug(`[CursorLocal] Filtered 'resume ${args[1]}' - session managed by hapi`); |
| 15 | return args.slice(2); |
| 16 | } |
| 17 | |
| 18 | logger.debug(`[CursorLocal] Filtered 'resume' - session managed by hapi`); |
| 19 | return args.slice(1); |
| 20 | } |
| 21 | |
| 22 | export async function cursorLocal(opts: { |
| 23 | abort: AbortSignal; |