1. Persistence Setup: Optimized the dockerfile to manually create the /root/.config/conn/.folder file
pointing to /config. This avoids running the conn command during the build process and ensures a
cleaner setup.
2. Copilot UI Fix: Resolved a double-escaping bug in the terminal bottom bar. Device prompts (like
6WIND-PE1>) will now render correctly instead of showing HTML entities like >.
3. AI Model Update: Updated the default engineer model in connpy/ai.py to
gemini/gemini-3.1-flash-lite, removing the deprecated -preview suffix.
4. Standardized Timeouts: Unified all default timeouts to 20 seconds across the board. This includes
direct execution (run/test), modern playbooks (v2), and classic task-based playbooks (v1).
5. Documentation Update: Regenerated the full documentation site in the docs/ directory using pdoc to
reflect the latest changes.
6. Cleanup: Removed all debug prints from connpy/core.py and restored the docker/logs/.gitignore
file.
This commit is contained in:
1 parent
3ad4f6da1f
commit
12543c683e
87 files changed
+6715
-2552
No files matched your search
+20
-14
@@ -35,8 +35,6 @@ def copilot_terminal_mode():
|
||||
new_settings[1] = new_settings[1] | termios.OPOST
|
||||
termios.tcsetattr(fd, termios.TCSANOW, new_settings)
|
||||
|
||||
yield
|
||||
except Exception:
|
||||
yield
|
||||
finally:
|
||||
try:
|
||||
@@ -610,20 +608,24 @@ class node:
|
||||
|
||||
async def handler(buffer, node_info, stream, child_fd, cmd_byte_positions=None):
|
||||
try:
|
||||
interface = CopilotInterface(config, history=getattr(stream, 'copilot_history', None))
|
||||
interface = CopilotInterface(
|
||||
config,
|
||||
history=getattr(stream, 'copilot_history', None),
|
||||
session_state=getattr(stream, 'copilot_state', None)
|
||||
)
|
||||
# Save history back to stream for persistence in current session
|
||||
stream.copilot_history = interface.history
|
||||
stream.copilot_state = interface.session_state
|
||||
|
||||
ai_service = AIService(config)
|
||||
|
||||
async def on_ai_call(active_buffer, question, chunk_callback):
|
||||
async def on_ai_call(active_buffer, question, chunk_callback, merged_node_info):
|
||||
return await ai_service.aask_copilot(
|
||||
active_buffer,
|
||||
question,
|
||||
node_info=node_info,
|
||||
active_buffer,
|
||||
question,
|
||||
node_info=merged_node_info,
|
||||
chunk_callback=chunk_callback
|
||||
)
|
||||
|
||||
# Get raw bytes from BytesIO
|
||||
raw_bytes = self.mylog.getvalue()
|
||||
|
||||
@@ -637,12 +639,16 @@ class node:
|
||||
|
||||
try:
|
||||
with copilot_terminal_mode():
|
||||
action, commands, custom_cmd = await interface.run_session(
|
||||
raw_bytes=raw_bytes,
|
||||
cmd_byte_positions=cmd_byte_positions,
|
||||
node_info=node_info,
|
||||
on_ai_call=on_ai_call
|
||||
)
|
||||
while True:
|
||||
action, commands, custom_cmd = await interface.run_session(
|
||||
raw_bytes=raw_bytes,
|
||||
cmd_byte_positions=cmd_byte_positions,
|
||||
node_info=node_info,
|
||||
on_ai_call=on_ai_call
|
||||
)
|
||||
if action == "continue":
|
||||
continue
|
||||
break
|
||||
finally:
|
||||
# Reiniciar el lector de la terminal para volver al modo interactivo SSH/Telnet
|
||||
if hasattr(stream, 'start_reading'):
|
||||
|
||||
Reference in new issue
Block a user