codegpt-ai 1.5.0 → 1.8.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 +114 -29
  2. package/package.json +1 -1
package/chat.py CHANGED
@@ -702,15 +702,53 @@ def show_profile():
702
702
 
703
703
 
704
704
  def setup_profile():
705
- """First-time profile setup wizard."""
705
+ """First-time welcome & profile setup wizard."""
706
706
  w = tw()
707
+ compact = is_compact()
708
+
709
+ # Big welcome popup
710
+ if compact:
711
+ console.print(Panel(
712
+ Text.from_markup(
713
+ "[bold bright_cyan]Welcome to CodeGPT![/]\n\n"
714
+ " Your local AI assistant.\n"
715
+ " 80+ commands. 8 agents.\n"
716
+ " 29 tools. No cloud needed.\n\n"
717
+ " Powered by [bold]Ollama[/].\n\n"
718
+ " [dim]Press Enter...[/]"
719
+ ),
720
+ border_style="bright_cyan", padding=(0, 1), width=w,
721
+ ))
722
+ else:
723
+ console.print(Panel(
724
+ Text.from_markup(
725
+ "[bold bright_cyan]Welcome to CodeGPT![/]\n\n"
726
+ " Your local AI assistant hub.\n\n"
727
+ " [bright_cyan]80+[/] slash commands\n"
728
+ " [bright_cyan]8[/] AI agents (coder, debugger, reviewer...)\n"
729
+ " [bright_cyan]29[/] AI tool integrations (Claude, Codex, Gemini...)\n"
730
+ " [bright_cyan]6[/] personas (hacker, teacher, architect...)\n"
731
+ " [bright_cyan]15[/] prompt templates\n\n"
732
+ " No cloud. No API keys. Powered by [bold]Ollama[/].\n\n"
733
+ " [dim]Press Enter to continue...[/]"
734
+ ),
735
+ title="[bold bright_cyan]CodeGPT v1.0[/]",
736
+ border_style="bright_cyan", padding=(1, 2), width=w,
737
+ ))
738
+
739
+ # Wait for Enter
740
+ try:
741
+ prompt([("class:prompt", " Press Enter to continue... ")], style=input_style)
742
+ except (KeyboardInterrupt, EOFError):
743
+ pass
744
+
745
+ clear_screen()
746
+ print_header(MODEL)
707
747
  console.print(Panel(
708
- Text("Welcome to CodeGPT! Let's set up your profile.", style="bold"),
709
- title="[bold bright_cyan]Setup[/]",
710
- border_style="bright_cyan",
711
- padding=(1, 2),
712
- width=w,
748
+ Text("Let's set up your profile — takes 10 seconds.", style="bold"),
749
+ border_style="bright_cyan", padding=(0, 1 if compact else 2), width=w,
713
750
  ))
751
+ console.print()
714
752
 
715
753
  try:
716
754
  name = prompt([("class:prompt", " Your name > ")], style=input_style).strip()
@@ -726,12 +764,46 @@ def setup_profile():
726
764
  profile["total_sessions"] = 1
727
765
  save_profile(profile)
728
766
 
729
- console.print(Panel(
730
- Text(f"Welcome, {profile['name']}!", style="bold bright_cyan"),
731
- border_style="bright_cyan",
732
- padding=(0, 2),
733
- width=w,
734
- ))
767
+ # Post-setup quick start guide
768
+ if compact:
769
+ console.print(Panel(
770
+ Text.from_markup(
771
+ f"[bold green]Hey {profile['name']}![/]\n\n"
772
+ " [dim]Quick start:[/]\n"
773
+ " Just type to chat\n"
774
+ " [bright_cyan]/[/] see all commands\n"
775
+ " [bright_cyan]/help[/] full guide\n"
776
+ " [bright_cyan]/connect IP[/] link PC\n\n"
777
+ " [dim]Press Enter...[/]"
778
+ ),
779
+ title="[bold green]Ready[/]",
780
+ border_style="green", padding=(0, 1), width=w,
781
+ ))
782
+ else:
783
+ console.print(Panel(
784
+ Text.from_markup(
785
+ f"[bold green]Welcome, {profile['name']}![/]\n\n"
786
+ " [bold]Quick start:[/]\n"
787
+ " [bright_cyan]Just type[/] Chat with the AI\n"
788
+ " [bright_cyan]/[/] See all commands\n"
789
+ " [bright_cyan]/help[/] Full command list\n"
790
+ " [bright_cyan]/persona hacker[/] Change personality\n"
791
+ " [bright_cyan]/agent coder[/] Use a specialist agent\n"
792
+ " [bright_cyan]/all question[/] Ask all 8 agents at once\n"
793
+ " [bright_cyan]/tools[/] Browse 29 AI tools\n"
794
+ " [bright_cyan]/connect IP[/] Connect to remote Ollama\n\n"
795
+ " [dim]Tip: Press / to see autocomplete suggestions.[/]\n\n"
796
+ " [dim]Press Enter to start chatting...[/]"
797
+ ),
798
+ title="[bold green]You're all set[/]",
799
+ border_style="green", padding=(1, 2), width=w,
800
+ ))
801
+
802
+ # Wait for Enter before entering chat
803
+ try:
804
+ prompt([("class:prompt", " Press Enter to start... ")], style=input_style)
805
+ except (KeyboardInterrupt, EOFError):
806
+ pass
735
807
  console.print()
736
808
 
737
809
 
@@ -4222,40 +4294,53 @@ def main():
4222
4294
 
4223
4295
  print_header(model)
4224
4296
 
4225
- # Welcome popup
4226
- if first_time:
4227
- pass # Setup wizard already shown
4228
- elif offline_mode:
4297
+ # Welcome popup — always show
4298
+ if not first_time:
4229
4299
  w = tw()
4230
4300
  compact = is_compact()
4231
4301
  name = profile.get("name", "User")
4302
+ is_local = "localhost" in OLLAMA_URL or "127.0.0.1" in OLLAMA_URL
4303
+ server = "local" if is_local else OLLAMA_URL.split("//")[1].split("/")[0] if "//" in OLLAMA_URL else "unknown"
4304
+ model_count = len(available_models)
4305
+ sessions = profile.get("total_sessions", 0)
4306
+ total_msgs = profile.get("total_messages", 0)
4307
+
4308
+ hour = datetime.now().hour
4309
+ greeting = "Good morning" if hour < 12 else "Good afternoon" if hour < 18 else "Good evening"
4232
4310
 
4233
4311
  if compact:
4312
+ if offline_mode:
4313
+ status_line = "[yellow]offline[/] — /connect IP"
4314
+ else:
4315
+ status_line = f"[green]connected[/] {model_count} models"
4316
+
4234
4317
  console.print(Panel(
4235
4318
  Text.from_markup(
4236
- f"[bold]Hey {name}![/]\n\n"
4237
- f" [dim]Offline mode[/]\n"
4238
- f" [dim]Use /connect IP[/]\n"
4239
- f" [dim]to link your PC[/]\n"
4319
+ f"[bold]{greeting}, {name}![/]\n\n"
4320
+ f" Model [bright_cyan]{model}[/]\n"
4321
+ f" Status {status_line}\n"
4322
+ f" Session [dim]#{sessions}[/]\n"
4240
4323
  ),
4241
- title="[bold bright_cyan]Welcome[/]",
4324
+ title="[bold bright_cyan]CodeGPT[/]",
4242
4325
  border_style="bright_cyan", padding=(0, 1), width=w,
4243
4326
  ))
4244
4327
  else:
4328
+ if offline_mode:
4329
+ status_line = f" Server: [yellow]offline[/] — use [bright_cyan]/connect IP[/] to link"
4330
+ else:
4331
+ status_line = f" Server: [green]{server}[/] ({model_count} models)"
4332
+
4245
4333
  console.print(Panel(
4246
4334
  Text.from_markup(
4247
- f"[bold]Welcome back, {name}![/]\n\n"
4248
- f" Status: [yellow]offline[/] — no Ollama found\n"
4249
- f" Fix: [bright_cyan]/connect YOUR_PC_IP[/]\n\n"
4250
- f" [dim]All commands work. AI responses need a connection.[/]"
4335
+ f"[bold]{greeting}, {name}![/]\n\n"
4336
+ f" Model: [bright_cyan]{model}[/]\n"
4337
+ f"{status_line}\n"
4338
+ f" Session: [dim]#{sessions}[/] ({total_msgs} lifetime msgs)\n\n"
4339
+ f" [dim]Type / for commands · /help for full list[/]"
4251
4340
  ),
4252
4341
  title="[bold bright_cyan]Welcome[/]",
4253
4342
  border_style="bright_cyan", padding=(1, 2), width=w,
4254
4343
  ))
4255
- else:
4256
- name = profile.get("name", "")
4257
- if name:
4258
- console.print(Align.center(Text(f"Welcome back, {name}.\n", style="bold white")), width=tw())
4259
4344
 
4260
4345
  print_welcome(model, available_models)
4261
4346
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codegpt-ai",
3
- "version": "1.5.0",
3
+ "version": "1.8.0",
4
4
  "description": "Local AI Assistant Hub — 80+ commands, 29 tools, 8 agents, training, security",
5
5
  "author": "ArukuX",
6
6
  "license": "MIT",