codegpt-ai 1.5.0 → 1.7.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 +95 -31
  2. package/package.json +1 -1
package/chat.py CHANGED
@@ -702,15 +702,40 @@ 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
- 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,
713
- ))
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"
718
+ ),
719
+ border_style="bright_cyan", padding=(0, 1), width=w,
720
+ ))
721
+ else:
722
+ console.print(Panel(
723
+ Text.from_markup(
724
+ "[bold bright_cyan]Welcome to CodeGPT![/]\n\n"
725
+ " Your local AI assistant hub.\n\n"
726
+ " [bright_cyan]80+[/] slash commands\n"
727
+ " [bright_cyan]8[/] AI agents (coder, debugger, reviewer...)\n"
728
+ " [bright_cyan]29[/] AI tool integrations (Claude, Codex, Gemini...)\n"
729
+ " [bright_cyan]6[/] personas (hacker, teacher, architect...)\n"
730
+ " [bright_cyan]15[/] prompt templates\n\n"
731
+ " No cloud. No API keys. Powered by [bold]Ollama[/].\n\n"
732
+ " [dim]Let's set up your profile — takes 10 seconds.[/]"
733
+ ),
734
+ title="[bold bright_cyan]CodeGPT v1.0[/]",
735
+ border_style="bright_cyan", padding=(1, 2), width=w,
736
+ ))
737
+
738
+ console.print()
714
739
 
715
740
  try:
716
741
  name = prompt([("class:prompt", " Your name > ")], style=input_style).strip()
@@ -726,12 +751,38 @@ def setup_profile():
726
751
  profile["total_sessions"] = 1
727
752
  save_profile(profile)
728
753
 
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
- ))
754
+ # Post-setup quick start guide
755
+ if compact:
756
+ console.print(Panel(
757
+ Text.from_markup(
758
+ f"[bold green]Hey {profile['name']}![/]\n\n"
759
+ " [dim]Quick start:[/]\n"
760
+ " Just type to chat\n"
761
+ " [bright_cyan]/[/] see all commands\n"
762
+ " [bright_cyan]/help[/] full guide\n"
763
+ " [bright_cyan]/connect IP[/] link PC\n"
764
+ ),
765
+ title="[bold green]Ready[/]",
766
+ border_style="green", padding=(0, 1), width=w,
767
+ ))
768
+ else:
769
+ console.print(Panel(
770
+ Text.from_markup(
771
+ f"[bold green]Welcome, {profile['name']}![/]\n\n"
772
+ " [bold]Quick start:[/]\n"
773
+ " [bright_cyan]Just type[/] Chat with the AI\n"
774
+ " [bright_cyan]/[/] See all commands\n"
775
+ " [bright_cyan]/help[/] Full command list\n"
776
+ " [bright_cyan]/persona hacker[/] Change personality\n"
777
+ " [bright_cyan]/agent coder[/] Use a specialist agent\n"
778
+ " [bright_cyan]/all question[/] Ask all 8 agents at once\n"
779
+ " [bright_cyan]/tools[/] Browse 29 AI tools\n"
780
+ " [bright_cyan]/connect IP[/] Connect to remote Ollama\n\n"
781
+ " [dim]Tip: Press / to see autocomplete suggestions.[/]"
782
+ ),
783
+ title="[bold green]You're all set[/]",
784
+ border_style="green", padding=(1, 2), width=w,
785
+ ))
735
786
  console.print()
736
787
 
737
788
 
@@ -4222,40 +4273,53 @@ def main():
4222
4273
 
4223
4274
  print_header(model)
4224
4275
 
4225
- # Welcome popup
4226
- if first_time:
4227
- pass # Setup wizard already shown
4228
- elif offline_mode:
4276
+ # Welcome popup — always show
4277
+ if not first_time:
4229
4278
  w = tw()
4230
4279
  compact = is_compact()
4231
4280
  name = profile.get("name", "User")
4281
+ is_local = "localhost" in OLLAMA_URL or "127.0.0.1" in OLLAMA_URL
4282
+ server = "local" if is_local else OLLAMA_URL.split("//")[1].split("/")[0] if "//" in OLLAMA_URL else "unknown"
4283
+ model_count = len(available_models)
4284
+ sessions = profile.get("total_sessions", 0)
4285
+ total_msgs = profile.get("total_messages", 0)
4286
+
4287
+ hour = datetime.now().hour
4288
+ greeting = "Good morning" if hour < 12 else "Good afternoon" if hour < 18 else "Good evening"
4232
4289
 
4233
4290
  if compact:
4291
+ if offline_mode:
4292
+ status_line = "[yellow]offline[/] — /connect IP"
4293
+ else:
4294
+ status_line = f"[green]connected[/] {model_count} models"
4295
+
4234
4296
  console.print(Panel(
4235
4297
  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"
4298
+ f"[bold]{greeting}, {name}![/]\n\n"
4299
+ f" Model [bright_cyan]{model}[/]\n"
4300
+ f" Status {status_line}\n"
4301
+ f" Session [dim]#{sessions}[/]\n"
4240
4302
  ),
4241
- title="[bold bright_cyan]Welcome[/]",
4303
+ title="[bold bright_cyan]CodeGPT[/]",
4242
4304
  border_style="bright_cyan", padding=(0, 1), width=w,
4243
4305
  ))
4244
4306
  else:
4307
+ if offline_mode:
4308
+ status_line = f" Server: [yellow]offline[/] — use [bright_cyan]/connect IP[/] to link"
4309
+ else:
4310
+ status_line = f" Server: [green]{server}[/] ({model_count} models)"
4311
+
4245
4312
  console.print(Panel(
4246
4313
  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.[/]"
4314
+ f"[bold]{greeting}, {name}![/]\n\n"
4315
+ f" Model: [bright_cyan]{model}[/]\n"
4316
+ f"{status_line}\n"
4317
+ f" Session: [dim]#{sessions}[/] ({total_msgs} lifetime msgs)\n\n"
4318
+ f" [dim]Type / for commands · /help for full list[/]"
4251
4319
  ),
4252
4320
  title="[bold bright_cyan]Welcome[/]",
4253
4321
  border_style="bright_cyan", padding=(1, 2), width=w,
4254
4322
  ))
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
4323
 
4260
4324
  print_welcome(model, available_models)
4261
4325
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codegpt-ai",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "description": "Local AI Assistant Hub — 80+ commands, 29 tools, 8 agents, training, security",
5
5
  "author": "ArukuX",
6
6
  "license": "MIT",