| 170 | if (!agent.resume) return reply(NA('Resume')); |
| 171 | const { readHandoff, formatHandoff } = await import('../session/handoff.js'); |
| 172 | const h = await readHandoff(); |
| 173 | if (!h) return reply('No CLI session waiting. In the terminal run `/phone`, then `/continue` here.'); |
| 174 | const ok = await agent.resume(key, h.sessionId); |
| 175 | await reply(ok |
| 176 | ? `🧵 Continuing the CLI session — tools will use this project, not the bot's launch directory.\n${formatHandoff(h)}` |
| 177 | : `Found a handoff (${formatHandoff(h)}) but that session is gone. Try \`/sessions\`.`); |
| 178 | }, |
| 179 | }, |
| 180 | { |
| 181 | name: 'resume', |
| 182 | description: 'Continue a past session: /resume <id>', |
| 183 | run: async ({ agent, args, key, reply }) => { |
| 184 | if (!agent.resume) return reply(NA('Resume')); |