Windows AI Assistant - Commands Reference
=============================================

TYPEwriter CHAT COMMANDS
-----------------------
exit                   Exit the assistant

/toggle                Toggle automatic web search ON/OFF
/search <query>        Force a web search for the given query

/logs [N]              Show the last N command execution logs (default: 5)
/clearcommandlogs      Delete all command log files from command_logs/
/review                Have the AI analyse recent logs for mistakes or improvements

/auto                  Toggle auto-execution mode ON/OFF
                       When ON, bash commands and code blocks from the AI are
                       executed automatically without confirmation prompts.
/build <description>   Enter auto-build mode.
                       Activates auto-execution and gives the AI a build prompt.
                       The AI will work autonomously: plan, execute, diagnose,
                       and fix until the build is complete.
                       Exit by typing "exit" or when the AI outputs [BUILD COMPLETE].
/fullyauto <description>
                        Enter fully autonomous mode. The AI takes full control:
                        it decides what to do, when to search the web, and what
                        code/commands to execute — all without asking permission.
                        Example: /fullyauto build a react todo app with a flask backend
                        If you just type /fullyauto with no description, the AI
                        will ask what you want to accomplish.
                        Use `[SEARCH: query]` in AI output to trigger web searches.
                        AI outputs [DONE] when finished. Type "exit" to cancel.

/browser [--visible] [url]
                        Enter browser automation mode.
                        Starts a Chromium browser controlled by the AI.
                        By default runs headless (hidden). Add --visible to
                        show the browser window so you can watch what it does.
                        The AI navigates, clicks, types, extracts data, takes
                        screenshots, and searches DuckDuckGo — all via
                        `[BROWSE: <action> <args>]` tokens in its output.
                        If a URL is provided, the browser navigates there first.
                        Available actions: navigate, go, search, click, type,
                        extract, html, scroll, screenshot, url, title, press,
                        script, wait, select, close.
                        AI outputs [BROWSER DONE] when finished.

                        While in browser mode you can interact:
                          /fullyauto <goal>   Tell the AI what to do on the page
                          !browse <action>    Run a browser action manually
                          !browse screenshot  Capture current page to a file
                          /help               Show in-mode commands
                          exit                Exit browser mode
                        In headless mode, a screenshot is auto-saved after
                        each AI action so you can preview the page.

DIRECT EXECUTION COMMANDS
-------------------------
!bash <command>        Execute a PowerShell command directly (bypasses AI)
!read <path>           Read and display the contents of a file
!write <path>          Write content to a file (paste content, end with 'EOF' on its own line)
!cd <dir>              Change the working directory for commands
!run <language>        Execute code in a specific language interactively
                       (paste code, end with 'EOF' on its own line)
!npm <args>            Run npm commands (install, build, test, etc.)
!pip <args>            Run pip commands (install, uninstall, list, etc.)
!browse <action> <args>
                       Direct browser command (starts browser, runs action, closes).
                       Examples:
                         !browse go https://example.com
                         !browse search python tutorial
                         !browse extract article
                         !browse screenshot

Note: All commands are logged to the command_logs/ folder for later review.

SUPPORTED LANGUAGES FOR CODE EXECUTION (!run)
----------------------------------------------
python / py            Python 3
javascript / js        Node.js
typescript / ts        TypeScript (via npx tsx)
html, css, json        Saved to file (non-executable)
xml, yaml, yml         Saved to file (non-executable)
markdown / md          Saved to file (non-executable)
sql                    Saved to file (non-executable)
rust                   Compiled and run via rustc
go                     Run via go run
ruby                   Run via ruby
php                    Run via php
bash                   Run via PowerShell (git bash or WSL)
