codegpt-ai 2.28.0 → 2.29.0

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/chat.py +25 -0
  2. package/package.json +1 -1
package/chat.py CHANGED
@@ -439,6 +439,7 @@ COMMANDS = {
439
439
  "/security": "Security status dashboard",
440
440
  "/permissions": "View/reset action permissions",
441
441
  "/desktop": "Launch CodeGPT desktop app",
442
+ "/tui": "Launch CodeGPT TUI mode",
442
443
  "/skill": "Create a custom command (/skill name prompt)",
443
444
  "/skills": "List custom skills",
444
445
  "/browse": "Browse a URL and summarize (/browse url)",
@@ -7259,6 +7260,30 @@ def main():
7259
7260
  print_sys("Desktop app opened in a new window.")
7260
7261
  continue
7261
7262
 
7263
+ elif cmd == "/tui":
7264
+ tui_paths = [
7265
+ os.path.join(str(Path(__file__).parent), "tui.py"),
7266
+ os.path.join(str(Path.home()), "codegpt", "tui.py"),
7267
+ ]
7268
+ tui_py = None
7269
+ for tp in tui_paths:
7270
+ if os.path.isfile(tp):
7271
+ tui_py = tp
7272
+ break
7273
+ if not tui_py:
7274
+ try:
7275
+ tui_py = os.path.join(str(Path.home()), ".codegpt", "tui.py")
7276
+ r = requests.get("https://raw.githubusercontent.com/CCguvycu/codegpt/master/tui.py", timeout=15)
7277
+ Path(tui_py).parent.mkdir(parents=True, exist_ok=True)
7278
+ Path(tui_py).write_text(r.text, encoding="utf-8")
7279
+ except Exception:
7280
+ print_err("Cannot download TUI.")
7281
+ continue
7282
+ print_sys("Launching TUI mode...")
7283
+ subprocess.run([sys.executable, tui_py])
7284
+ print_header(model)
7285
+ continue
7286
+
7262
7287
  elif cmd == "/permissions":
7263
7288
  sub = user_input[len("/permissions "):].strip().lower()
7264
7289
  if sub == "reset":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codegpt-ai",
3
- "version": "2.28.0",
3
+ "version": "2.29.0",
4
4
  "description": "Local AI Assistant Hub — 123 commands, 26 tools, 8 agents, multi-AI, security. No cloud needed.",
5
5
  "author": "ArukuX",
6
6
  "license": "MIT",