codegpt-ai 2.35.0 → 2.35.1
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.
- package/chat.py +16 -0
- package/package.json +1 -1
package/chat.py
CHANGED
|
@@ -440,6 +440,7 @@ COMMANDS = {
|
|
|
440
440
|
"/permissions": "View/reset action permissions",
|
|
441
441
|
"/desktop": "Launch CodeGPT desktop app",
|
|
442
442
|
"/tui": "Launch CodeGPT TUI mode",
|
|
443
|
+
"/web": "Open CodeGPT website",
|
|
443
444
|
"/skill": "Create a custom command (/skill name prompt)",
|
|
444
445
|
"/skills": "List custom skills",
|
|
445
446
|
"/browse": "Browse a URL and summarize (/browse url)",
|
|
@@ -7266,6 +7267,21 @@ def main():
|
|
|
7266
7267
|
print_sys("Desktop app opened in a new window.")
|
|
7267
7268
|
continue
|
|
7268
7269
|
|
|
7270
|
+
elif cmd == "/web":
|
|
7271
|
+
url = "https://github.com/CCguvycu/codegpt"
|
|
7272
|
+
print_sys(f"Opening {url}")
|
|
7273
|
+
if os.path.exists("/data/data/com.termux"):
|
|
7274
|
+
try:
|
|
7275
|
+
subprocess.run(["termux-open-url", url], timeout=5)
|
|
7276
|
+
except Exception:
|
|
7277
|
+
subprocess.run(["am", "start", "-a", "android.intent.action.VIEW", "-d", url], timeout=5)
|
|
7278
|
+
elif os.name == "nt":
|
|
7279
|
+
os.startfile(url)
|
|
7280
|
+
else:
|
|
7281
|
+
import webbrowser
|
|
7282
|
+
webbrowser.open(url)
|
|
7283
|
+
continue
|
|
7284
|
+
|
|
7269
7285
|
elif cmd == "/tui":
|
|
7270
7286
|
# TUI is for Termux/mobile only — PC uses /desktop or full CLI
|
|
7271
7287
|
if not os.path.exists("/data/data/com.termux"):
|