thincoder 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thincoder",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Thin coding agent - zero dependencies, no build step, Node.js native. Sharp code, zero bloat.",
5
5
  "keywords": [
6
6
  "ai",
@@ -1,19 +1,9 @@
1
1
  /** /exit command: exit TUI (same path as Ctrl+C).
2
- * ctx: { agent, state } */
3
- import { saveSession, archiveCurrent } from "../session.mjs"
4
- import { closeAllMcp } from "../mcp.mjs"
5
- import { ansi } from "./ansi.mjs"
6
-
7
- export async function handleExitCommand(ctx) {
8
- const { agent, state } = ctx
9
- // Same cleanup sequence as Ctrl+C in key-handler.mjs
10
- try {
11
- archiveCurrent(agent.cwd)
12
- saveSession(agent, state.lines)
13
- } catch { /* save failure shouldn't block exit */ }
14
- try { closeAllMcp(agent) } catch { /* exiting anyway */ }
15
- process.stdin.setRawMode(false)
16
- process.stdout.write(ansi.clearScreen + ansi.mouseOff + ansi.bracketedPasteOff + ansi.mainBuffer + ansi.showCursor + ansi.reset)
17
- // Exit synchronously — prevents post-handler render() from redrawing the TUI
2
+ * Direct synchronous process.exit prevents the post-handler render()
3
+ * from redrawing the TUI over the cleaned terminal. The actual cleanup
4
+ * (archiveCurrent + saveSession + closeMcp + terminal reset) runs once
5
+ * via the process.on("exit") handler registered in index.mjs.
6
+ */
7
+ export async function handleExitCommand(_ctx) {
18
8
  process.exit(0)
19
9
  }