**Motivations:** - Keep the Lapce fork changes replayable via patch files in the monorepo. - Expose a minimal Smart IDE cockpit UX (agents, runs, services, connection) inside Lapce. **Root causes:** - N/A **Correctifs:** - ia-dev-gateway: parse YAML frontmatter (name/description) from agent markdown files. **Evolutions:** - Export new Lapce patch files for the Smart IDE panel + connection helpers. - Add documentation for the Smart IDE panel. **Pages affectées:** - N/A
68 lines
2.0 KiB
Markdown
68 lines
2.0 KiB
Markdown
# Smart IDE panel (Lapce)
|
|
|
|
The **Smart IDE** panel is a cockpit inside Lapce to:
|
|
|
|
- browse the `ia_dev` agent catalog,
|
|
- run a small set of operational agents (via `ia-dev-gateway`),
|
|
- follow run status + logs (SSE),
|
|
- open related web services (preview, AnythingLLM, local-office),
|
|
- check connectivity and generate an SSH tunnel command.
|
|
|
|
## Open the panel
|
|
|
|
- **Command palette**: `Smart IDE: Open Panel`
|
|
- **Pinned actions shortcuts**: `Smart IDE: Run Pinned Action 1..9` (bind your own keys)
|
|
|
|
The panel is registered as a Lapce **left-top** panel with the **lightbulb** icon.
|
|
|
|
## Tabs
|
|
|
|
### Agents
|
|
|
|
- **Refresh** fetches `GET /v1/agents` from `ia-dev-gateway`.
|
|
- **Run** starts a run (`POST /v1/runs`) when the agent is runnable.
|
|
- **Open** opens the agent Markdown definition under:
|
|
- `services/ia_dev/.smartIde/agents/<agentId>.md`
|
|
|
|
### Runs
|
|
|
|
- Shows recent runs started from the panel.
|
|
- Streams events from `GET /v1/runs/<runId>/events` and appends:
|
|
- stdout/stderr (script logs),
|
|
- lifecycle events (started/completed/failed).
|
|
|
|
### Services
|
|
|
|
Minimal “open in browser” hub:
|
|
|
|
- **Preview**: read from `projects/<id>/conf.json`:
|
|
- `smart_ide.preview_urls.<env>`
|
|
- **AnythingLLM**: `http://127.0.0.1:3001/` (requires tunnel mode `all`)
|
|
- **local-office**: `http://127.0.0.1:8000/` (requires tunnel mode `all`)
|
|
|
|
### Connection
|
|
|
|
- **Health checks**:
|
|
- `GET /health` on orchestrator, `ia-dev-gateway`, and tools-bridge.
|
|
- **SSH tunnel plan**:
|
|
- Runs `scripts/smart-ide-ssh-tunnel-plan.sh --json`
|
|
- Displays a copyable command (shell-escaped argv) and the hint message.
|
|
|
|
## Configuration keys
|
|
|
|
The panel reads settings from the Lapce config section `[smart-ide]`:
|
|
|
|
- `orchestrator_url`, `orchestrator_token`
|
|
- `ia_dev_gateway_url`, `ia_dev_gateway_token`
|
|
- `tools_bridge_url`, `tools_bridge_token`
|
|
- `project_id`, `env`
|
|
- `pinned_actions` (CSV)
|
|
|
|
Project context resolution (first match):
|
|
|
|
- settings (`project_id`, `env`)
|
|
- `projects/active-project.json` (gitignored)
|
|
|
|
Tokens must stay in user settings (never committed).
|
|
|