codegpt-ai 1.22.0 → 1.23.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.
- package/chat.py +40 -2
- package/package.json +1 -1
package/chat.py
CHANGED
|
@@ -5743,10 +5743,48 @@ def main():
|
|
|
5743
5743
|
tool = AI_TOOLS[tool_key]
|
|
5744
5744
|
tool_bin = tool["bin"]
|
|
5745
5745
|
|
|
5746
|
-
# Block unsupported tools on Termux
|
|
5746
|
+
# Block unsupported tools on Termux — explain why
|
|
5747
5747
|
is_termux = os.path.exists("/data/data/com.termux")
|
|
5748
5748
|
if is_termux and not tool.get("termux", True):
|
|
5749
|
-
|
|
5749
|
+
reasons = {
|
|
5750
|
+
"opencode": "OpenCode needs Bun runtime and native x86/x64 binaries that aren't available for ARM processors.",
|
|
5751
|
+
"codex": "Codex requires native binaries that don't compile on ARM/Android.",
|
|
5752
|
+
"gpt4all": "GPT4All needs a C++ backend (llama.cpp) that requires desktop-level hardware to run.",
|
|
5753
|
+
}
|
|
5754
|
+
reason = reasons.get(tool_key, "This tool requires native binaries that aren't available for ARM/Android.")
|
|
5755
|
+
|
|
5756
|
+
# Suggest alternatives
|
|
5757
|
+
alternatives = {
|
|
5758
|
+
"opencode": "/cline or /gemini",
|
|
5759
|
+
"codex": "/gemini or /cline",
|
|
5760
|
+
"gpt4all": "/ollama (if available) or /connect PC_IP",
|
|
5761
|
+
}
|
|
5762
|
+
alt = alternatives.get(tool_key, "Check /tools for available alternatives")
|
|
5763
|
+
|
|
5764
|
+
compact = is_compact()
|
|
5765
|
+
if compact:
|
|
5766
|
+
console.print(Panel(
|
|
5767
|
+
Text.from_markup(
|
|
5768
|
+
f"[bold red]{tool['name']}[/]\n\n"
|
|
5769
|
+
f" [dim]{reason[:60]}[/]\n\n"
|
|
5770
|
+
f" Try: [bright_cyan]{alt}[/]"
|
|
5771
|
+
),
|
|
5772
|
+
title="[bold red]Not Available[/]",
|
|
5773
|
+
border_style="red", padding=(0, 1), width=tw(),
|
|
5774
|
+
))
|
|
5775
|
+
else:
|
|
5776
|
+
console.print(Panel(
|
|
5777
|
+
Text.from_markup(
|
|
5778
|
+
f"[bold red]{tool['name']} is not available on Termux[/]\n\n"
|
|
5779
|
+
f" [bold]Why:[/]\n"
|
|
5780
|
+
f" {reason}\n\n"
|
|
5781
|
+
f" [bold]Alternatives:[/]\n"
|
|
5782
|
+
f" [bright_cyan]{alt}[/]\n\n"
|
|
5783
|
+
f" [dim]Or use this tool on your PC instead.[/]"
|
|
5784
|
+
),
|
|
5785
|
+
title="[bold red]Not Supported[/]",
|
|
5786
|
+
border_style="red", padding=(1, 2), width=tw(),
|
|
5787
|
+
))
|
|
5750
5788
|
continue
|
|
5751
5789
|
tool_args = user_input[len(cmd):].strip()
|
|
5752
5790
|
|