ó
    |¤jÄ  ã                  óx   • % S r SSKJr  SSKrSSKrS/ SQ4S/ SQ4S/ S	Q4S
/ SQ4/rS\S'   / SQrSS jr	SS jr
g)zÆShared command definitions and utilities used by both CLI and TUI.

This module contains UI-agnostic pieces of slash-command handling so that
command behavior only needs to be updated in one place.
é    )ÚannotationsNÚSession))z/helpz	Show help)z/clearzClear conversation history)z/infoz+Show runtime info (provider, model, config))z/statsz+Show session stats (tool calls, model info))z/voicez0Voice input (on/off/model/silence/max/threshold))z/ttsz7Voice output (on/off/status/model/voice/speed/say/last))z/camera capture [file]zTake a photo with the camera)z /camera record [duration] [file]zRecord video (default 5s))z/copyz$Copy the last reply to the clipboard)z/save [path]z=Save the last reply to a file (default acli_output_<time>.md))z/json on|offz1JSON output mode (replies forced to JSON when on))z	/compressz/Compress context (LLM summary replaces history))z/historyz5Conversation history (stats/list/search/export/clear))z/undoz,Undo the last file write/delete (checkpoint))z/feedback good|badz4Rate task satisfaction (stored in experience memory))z/reportz#Generate a trace performance report)z/logzNView LLM prompts logged in debug mode (tail [N]/search <keyword>/clear), paged)z/tracezXView execution traces (calls/latency/data flow) (tail [N]/search <keyword>/clear), paged)z/exitÚExitÚConfig)
)z/setupz:Set up the workspace (user, Provider, model, capabilities))z/capabilityz6Capability toggles (list/enable/disable/reload/config))z
/subagentsz7Subagent management (list/reload/enable/disable/config))z	/providerz7Configure Provider / Key / model / protocol (Q&A style))z/trustz>Tool trust/deny cache for this session (list/clear/allow/deny))z/rulez\Long-term user rules (list/add/remove/edit/clear), injected into the system prompt each turn)z/privacyz6Privacy mode (on/off/status); data stays local when on)z/debugz5Debug mode (on/off/status); logs the final LLM prompt)z/themez'Theme settings (list/set/custom colors))z/directivesz<Directives auto-learning proposals (proposals/accept/reject)ÚCapabilities))z/profilez+User profile (list/search/add/remove/clear))z/memoryz0Chat history (list/search/remove <id|num>/clear))z/sessionz3Sessions (new/list/switch/rename/fork/remove/scene))z
/summarizez8Summarize the current task; record key steps and lessons)z/mcpzMCP services (list/add/remove))z/skillzYSkill invocation and management (list/add/remove/install/uninstall/enable/disable/update))z/cronz.Scheduled tasks (add/list/remove/pause/resume))z/auditz"Audit log (recent [N]/query/clear)zDev / Extensions))z/devz,Overview (model registry + extension guides))z./dev model add|list|remove <provider> [<name>]zCRegister/list/remove models for a provider (persisted to workspace))z$/dev provider add|list|remove [name]zULayer-1 LLM Provider extension (OpenAI-compatible), written to custom-extensions.toml)z%/dev capability add|list|remove [key]z7Layer-1 HTTP tool capability extension, scaffold + edit)z!/dev skill add|list|remove [name]zILayer-1 custom Skill (prompt template), written to custom-extensions.toml)z /dev tool add|list|remove [name]z9Layer-1 custom Shell tool (wrap a command as an LLM tool))z#/dev debug tools|schema|call|promptzEDebug: registered tools / param schemas / manual call / system prompt)z(/dev test provider <name> | reload | logzLTest provider connectivity / hot-reload extensions / tool registration stats)z/dev platform | tool | skillz>Layer-2 guide for real Python module extensions (prints steps))z/examplezList available example projects)z/example download <name>zIMerge an example into ./.acli/ (conflicts auto-backed up, restore undoes))z/example restorez6Restore the .acli/backup/ backup (undo the last merge)z'list[tuple[str, list[tuple[str, str]]]]ÚHELP_SECTIONS)z#List files in the current directoryz(Create a test.txt containing hello worldz/mcp add code-interpreterz'/cron add every 5m /skill my-skill arg1z*/history export history.json --format jsonz/json onz/save output.mdc                 ó  • S/n [          H<  u  pU R                  SU S35        U H  u  p4U R                  SU SU 35        M     M>     U R                  S5        [         H  nU R                  SU 35        M     SR                  U 5      $ )	z-Return the /help content as Rich-tagged text.z[bold]Available commands[/bold]z
[bold yellow]z[/bold yellow]z  [cyan]u   [/cyan] [dim]â€”[/dim] z
[bold]Examples[/bold]u     [dim]Â·[/dim] Ú
)r   ÚappendÚ_HELP_EXAMPLESÚjoin)ÚlinesÚtitleÚitemsÚcmd_textÚdescÚexs         Ú¥C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\dashscope/acli/commands.pyÚrender_help_textr   Ç   s�   € à.Ð/€Eß%‰ˆØ�‰� u g¨^Ð<Ô=Û#‰NˆHØ�L‰L˜8 H :Ð-DÀTÀFÐKÖLó $ñ &ð 
‡L�LÐ*Ô+ßˆØ�‰Ð'¨ tÐ,Ö-ñ à�9‰9�UÓÐó    c           	     ó  • [         R                  R                  5       nSUS'    [        R                  " U SUSSSS9nUR
                  UR                  UR                  4$ ! [         a  nS[        U5      S4s SnA$ SnAff = f)	zçExecute a shell escape command and return (stdout, stderr, rc).

Used by the TUI where output must be captured and rendered into the
RichLog. The CLI keeps its own direct-terminal implementation for
streaming interactive commands.
Ú1ÚACLI_CLITF)ÚshellÚenvÚcapture_outputÚtextÚcheckÚ é   N)
ÚosÚenvironÚcopyÚ_spÚrunÚstdoutÚstderrÚ
returncodeÚ	ExceptionÚstr)Ú	shell_cmdr   ÚprocÚes       r   Úhandle_shell_escaper.   Ô   s}   € ô �*‰*�/‰/Ó
€CØ€Cˆ
�OðÜ�wŠwØØØØØØñ
ˆð �{‰{˜DŸK™K¨¯©Ð8Ð8øÜó Ø”3�q“6˜1ˆ}Õûðús   ¥;A! Á!
BÁ+A>Á8BÁ>B)Úreturnr*   )r+   r*   r/   ztuple[str, str, int])Ú__doc__Ú
__future__r   r!   Ú
subprocessr$   r   Ú__annotations__r   r   r.   © r   r   Ú<module>r5      sw   ðòõ #ã 	Û ð 	ò,	
ð/ðb 	ò(	
ð+ðZ 	ò	
ðð0 	ò2	
ð5ðij:€Ð6ó jòZ€ô
õr   