codegpt-ai 1.7.0 → 1.10.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 +41 -7
  2. package/package.json +4 -3
package/chat.py CHANGED
@@ -149,7 +149,9 @@ AI_TOOLS = {
149
149
  "name": "Ollama",
150
150
  "desc": "Run local LLMs (already installed)",
151
151
  "bin": "ollama",
152
- "install": ["winget", "install", "Ollama.Ollama"],
152
+ "install": ["pip", "install", "ollama"],
153
+ "install_termux": ["pkg", "install", "-y", "ollama"],
154
+ "install_win": ["winget", "install", "Ollama.Ollama"],
153
155
  "default_args": ["run", "llama3.2"],
154
156
  "needs_key": "None — runs locally",
155
157
  },
@@ -157,7 +159,9 @@ AI_TOOLS = {
157
159
  "name": "jq",
158
160
  "desc": "JSON processor for the command line",
159
161
  "bin": "jq",
160
- "install": ["winget", "install", "jqlang.jq"],
162
+ "install": ["pip", "install", "jq"],
163
+ "install_termux": ["pkg", "install", "-y", "jq"],
164
+ "install_win": ["winget", "install", "jqlang.jq"],
161
165
  "default_args": [],
162
166
  "needs_key": "None",
163
167
  },
@@ -714,7 +718,8 @@ def setup_profile():
714
718
  " Your local AI assistant.\n"
715
719
  " 80+ commands. 8 agents.\n"
716
720
  " 29 tools. No cloud needed.\n\n"
717
- " Powered by [bold]Ollama[/].\n"
721
+ " Powered by [bold]Ollama[/].\n\n"
722
+ " [dim]Press Enter...[/]"
718
723
  ),
719
724
  border_style="bright_cyan", padding=(0, 1), width=w,
720
725
  ))
@@ -729,12 +734,24 @@ def setup_profile():
729
734
  " [bright_cyan]6[/] personas (hacker, teacher, architect...)\n"
730
735
  " [bright_cyan]15[/] prompt templates\n\n"
731
736
  " No cloud. No API keys. Powered by [bold]Ollama[/].\n\n"
732
- " [dim]Let's set up your profile — takes 10 seconds.[/]"
737
+ " [dim]Press Enter to continue...[/]"
733
738
  ),
734
739
  title="[bold bright_cyan]CodeGPT v1.0[/]",
735
740
  border_style="bright_cyan", padding=(1, 2), width=w,
736
741
  ))
737
742
 
743
+ # Wait for Enter
744
+ try:
745
+ prompt([("class:prompt", " Press Enter to continue... ")], style=input_style)
746
+ except (KeyboardInterrupt, EOFError):
747
+ pass
748
+
749
+ clear_screen()
750
+ print_header(MODEL)
751
+ console.print(Panel(
752
+ Text("Let's set up your profile — takes 10 seconds.", style="bold"),
753
+ border_style="bright_cyan", padding=(0, 1 if compact else 2), width=w,
754
+ ))
738
755
  console.print()
739
756
 
740
757
  try:
@@ -760,7 +777,8 @@ def setup_profile():
760
777
  " Just type to chat\n"
761
778
  " [bright_cyan]/[/] see all commands\n"
762
779
  " [bright_cyan]/help[/] full guide\n"
763
- " [bright_cyan]/connect IP[/] link PC\n"
780
+ " [bright_cyan]/connect IP[/] link PC\n\n"
781
+ " [dim]Press Enter...[/]"
764
782
  ),
765
783
  title="[bold green]Ready[/]",
766
784
  border_style="green", padding=(0, 1), width=w,
@@ -778,11 +796,18 @@ def setup_profile():
778
796
  " [bright_cyan]/all question[/] Ask all 8 agents at once\n"
779
797
  " [bright_cyan]/tools[/] Browse 29 AI tools\n"
780
798
  " [bright_cyan]/connect IP[/] Connect to remote Ollama\n\n"
781
- " [dim]Tip: Press / to see autocomplete suggestions.[/]"
799
+ " [dim]Tip: Press / to see autocomplete suggestions.[/]\n\n"
800
+ " [dim]Press Enter to start chatting...[/]"
782
801
  ),
783
802
  title="[bold green]You're all set[/]",
784
803
  border_style="green", padding=(1, 2), width=w,
785
804
  ))
805
+
806
+ # Wait for Enter before entering chat
807
+ try:
808
+ prompt([("class:prompt", " Press Enter to start... ")], style=input_style)
809
+ except (KeyboardInterrupt, EOFError):
810
+ pass
786
811
  console.print()
787
812
 
788
813
 
@@ -5592,7 +5617,16 @@ def main():
5592
5617
  audit_log(f"TOOL_EXIT", tool_key)
5593
5618
  else:
5594
5619
  print_sys(f"Installing {tool['name']}...")
5595
- install_cmd = tool["install"]
5620
+
5621
+ # Pick platform-specific install command
5622
+ is_termux = os.path.exists("/data/data/com.termux")
5623
+ if is_termux and "install_termux" in tool:
5624
+ install_cmd = list(tool["install_termux"])
5625
+ elif os.name == "nt" and "install_win" in tool:
5626
+ install_cmd = list(tool["install_win"])
5627
+ else:
5628
+ install_cmd = list(tool["install"])
5629
+
5596
5630
  is_npm = install_cmd[0] in ("npm", "npm.cmd")
5597
5631
 
5598
5632
  if is_npm and os.name == "nt":
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "codegpt-ai",
3
- "version": "1.7.0",
3
+ "version": "1.10.0",
4
4
  "description": "Local AI Assistant Hub — 80+ commands, 29 tools, 8 agents, training, security",
5
5
  "author": "ArukuX",
6
6
  "license": "MIT",
7
7
  "bin": {
8
- "ai": "./bin/ai.js",
9
- "codegpt": "./bin/ai.js"
8
+ "code": "./bin/ai.js",
9
+ "codegpt": "./bin/ai.js",
10
+ "ai": "./bin/ai.js"
10
11
  },
11
12
  "scripts": {
12
13
  "postinstall": "node bin/setup.js"