dfcode 2.3.2 → 2.3.3

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.
Files changed (2) hide show
  1. package/bin/dfcode +19 -1
  2. package/package.json +7 -7
package/bin/dfcode CHANGED
@@ -13,10 +13,28 @@ function run(target) {
13
13
  console.error(result.error.message)
14
14
  process.exit(1)
15
15
  }
16
- const code = typeof result.status === "number" ? result.status : 0
16
+ const code = typeof result.status === "number" ? result.status : result.signal ? 1 : 0
17
+ if (code !== 0) resetTerminal()
17
18
  process.exit(code)
18
19
  }
19
20
 
21
+ function resetTerminal() {
22
+ if (!process.stdout.isTTY && process.env.DFCODE_FORCE_TERMINAL_RESET !== "1") return
23
+ process.stdout.write([
24
+ "\x1b[0m",
25
+ "\x1b[?25h",
26
+ "\x1b[?1000l",
27
+ "\x1b[?1002l",
28
+ "\x1b[?1003l",
29
+ "\x1b[?1004l",
30
+ "\x1b[?1005l",
31
+ "\x1b[?1006l",
32
+ "\x1b[?1015l",
33
+ "\x1b[?2004l",
34
+ "\x1b[?1049l",
35
+ ].join(""))
36
+ }
37
+
20
38
  const envPath = process.env.DFCODE_BIN_PATH
21
39
  if (envPath) {
22
40
  run(envPath)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dfcode",
3
- "version": "2.3.2",
3
+ "version": "2.3.3",
4
4
  "description": "AI-powered coding assistant - TUI interface",
5
5
  "bin": {
6
6
  "dfcode": "./bin/dfcode"
@@ -9,12 +9,12 @@
9
9
  "postinstall": "node ./postinstall.mjs"
10
10
  },
11
11
  "optionalDependencies": {
12
- "dfcode-darwin-arm64": "2.3.2",
13
- "dfcode-darwin-x64": "2.3.2",
14
- "dfcode-linux-x64": "2.3.2",
15
- "dfcode-linux-arm64": "2.3.2",
16
- "dfcode-windows-x64": "2.3.2"
12
+ "dfcode-darwin-arm64": "2.3.3",
13
+ "dfcode-darwin-x64": "2.3.3",
14
+ "dfcode-linux-x64": "2.3.3",
15
+ "dfcode-linux-arm64": "2.3.3",
16
+ "dfcode-windows-x64": "2.3.3"
17
17
  },
18
18
  "license": "MIT",
19
19
  "keywords": ["ai", "coding", "assistant", "cli", "tui", "llm", "claude", "openai", "gpt"]
20
- }
20
+ }