yncli 1.1.8__tar.gz → 1.2.0__tar.gz
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.
- {yncli-1.1.8 → yncli-1.2.0}/PKG-INFO +1 -1
- {yncli-1.1.8 → yncli-1.2.0}/pyproject.toml +1 -1
- {yncli-1.1.8 → yncli-1.2.0}/setup.py +1 -1
- {yncli-1.1.8 → yncli-1.2.0}/yncli/agent.py +11 -1
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tui.py +26 -1
- yncli-1.2.0/yncli/version.py +1 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/PKG-INFO +1 -1
- yncli-1.1.8/yncli/version.py +0 -1
- {yncli-1.1.8 → yncli-1.2.0}/README.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/setup.cfg +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/__init__.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/architect.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/code_review.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/debug_oracle.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/debugger.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/polyglot.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/refactor_master.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/security_auditor.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/system_architect.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/test_runner.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/built_in_skills/ultrabrain.md +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/clean_text.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/client.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/config.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/language_detector.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/main.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/mention_resolver.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/skills_manager.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/system_prompt.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tools/__init__.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tools/file_tools.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tools/polyglot_tools.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tools/search_tools.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/tools/system_tools.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/update_checker.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/workspace_memory.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli/workspace_scanner.py +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/SOURCES.txt +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/dependency_links.txt +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/entry_points.txt +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/requires.txt +0 -0
- {yncli-1.1.8 → yncli-1.2.0}/yncli.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text(encoding="utf-8") if
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="yncli",
|
|
9
|
-
version="1.
|
|
9
|
+
version="1.2.0",
|
|
10
10
|
description="Autonomous Polyglot AI Coding Agent & TUI",
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
@@ -104,8 +104,18 @@ class Agent:
|
|
|
104
104
|
if on_status_update:
|
|
105
105
|
on_status_update(f"Menghubungi AI ({self.model}) [{self.mode.capitalize()} Mode]...")
|
|
106
106
|
|
|
107
|
+
# Trim history to avoid huge multi-megabyte payloads causing socket write timeout
|
|
108
|
+
# Keep last 12 messages, truncating large tool outputs
|
|
109
|
+
trimmed_history = []
|
|
110
|
+
for msg in self.history[-12:]:
|
|
111
|
+
m_copy = dict(msg)
|
|
112
|
+
content = m_copy.get("content")
|
|
113
|
+
if content and isinstance(content, str) and len(content) > 15000:
|
|
114
|
+
m_copy["content"] = content[:15000] + "\n... [Output truncated to preserve context]"
|
|
115
|
+
trimmed_history.append(m_copy)
|
|
116
|
+
|
|
107
117
|
system_prompt = build_system_prompt(self.workspace_dir, self.skills_mgr, self.mode, self.workspace_memory)
|
|
108
|
-
messages = [{"role": "system", "content": system_prompt}] +
|
|
118
|
+
messages = [{"role": "system", "content": system_prompt}] + trimmed_history
|
|
109
119
|
|
|
110
120
|
thinking_cb = on_thinking if self.show_thinking else None
|
|
111
121
|
tools = self._get_active_tools()
|
|
@@ -179,7 +179,9 @@ class TerminalUI:
|
|
|
179
179
|
table.add_column("Keterangan", style="white")
|
|
180
180
|
|
|
181
181
|
table.add_row("/model, /models", "Buka popup interaktif untuk memilih model AI (klik mouse / panah)")
|
|
182
|
-
table.add_row("/model <nama>", "Ganti model secara langsung")
|
|
182
|
+
table.add_row("/model <nama>", "Ganti model secara langsung (misal: /model ag/claude-sonnet-4-6)")
|
|
183
|
+
table.add_row("/key <api_key>", "Ganti API Key kustom Anda")
|
|
184
|
+
table.add_row("/endpoint <url>", "Ganti Endpoint API kustom (OpenAI, Ollama, OpenRouter, Groq, dll)")
|
|
183
185
|
table.add_row("/plan", "Masuk ke Plan Mode (Riset & susun PRD plan.md otomatis)")
|
|
184
186
|
table.add_row("/build", "Masuk ke Build Mode (Eksekusi autonomous pembuatan & editing kode)")
|
|
185
187
|
table.add_row("/ask", "Masuk ke Ask Mode (Konsultasi murni tanpa modifikasi file)")
|
|
@@ -312,6 +314,29 @@ class TerminalUI:
|
|
|
312
314
|
self.console.print(f"[green]Model berhasil diganti ke: [cyan]{new_model}[/cyan][/green]")
|
|
313
315
|
return True
|
|
314
316
|
|
|
317
|
+
elif cmd in ("/endpoint", "/baseurl"):
|
|
318
|
+
if not args:
|
|
319
|
+
self.console.print(f"Endpoint API saat ini: [cyan]{self.agent.client.base_url}[/cyan]")
|
|
320
|
+
self.console.print("Gunakan: [yellow]/endpoint <url_base_api>[/yellow] (contoh: https://api.openai.com/v1 atau http://localhost:11434/v1)")
|
|
321
|
+
return True
|
|
322
|
+
new_url = args[0].strip().rstrip("/")
|
|
323
|
+
self.agent.client.base_url = new_url
|
|
324
|
+
save_config({"base_url": new_url})
|
|
325
|
+
self.console.print(f"[green]Endpoint API berhasil diganti ke: [cyan]{new_url}[/cyan][/green]")
|
|
326
|
+
return True
|
|
327
|
+
|
|
328
|
+
elif cmd in ("/key", "/apikey"):
|
|
329
|
+
if not args:
|
|
330
|
+
masked = self.agent.client.api_key[:6] + "..." + self.agent.client.api_key[-4:] if len(self.agent.client.api_key) > 10 else "***"
|
|
331
|
+
self.console.print(f"API Key saat ini: [cyan]{masked}[/cyan]")
|
|
332
|
+
self.console.print("Gunakan: [yellow]/key <api_key_anda>[/yellow]")
|
|
333
|
+
return True
|
|
334
|
+
new_key = args[0].strip()
|
|
335
|
+
self.agent.client.api_key = new_key
|
|
336
|
+
save_config({"api_key": new_key})
|
|
337
|
+
self.console.print("[green]API Key berhasil disimpan dan diperbarui.[/green]")
|
|
338
|
+
return True
|
|
339
|
+
|
|
315
340
|
elif cmd == "/plan":
|
|
316
341
|
self.agent.set_mode("plan")
|
|
317
342
|
save_config({"mode": "plan"})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.0"
|
yncli-1.1.8/yncli/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.8"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|