How abhinavdatta/neelima works
Neelima is a local-first desktop coding agent: users select a workspace and provider, send a task through the chat UI, review permission-gated tool calls, and receive changes that can be inspected or restored with Git checkpoints. Its main runtime spans the desktop interface, Tauri command boundary, agent/tool protocol, provider integrations, and workspace safety and persistence. The README documents the high-level flow; sampled source confirms key UI, agent, provider-webview, and workspace behavior. Some subsystem links rely on README documentation because their implementation excerpts were not provided.
Main entry points: agent.rs Agent loop · App.tsx Application shell · tauri.ts Command client · ui.rs Desktop commands
Components 29
Desktop interface
- Application shell
ui/src/App.tsx - Projects and tasks
ui/src/components/Sidebar.tsx - Chat and composer
ui/src/components/Chat.tsx - Workspace browser
ui/src/components/FileTree.tsx - Terminal panel
ui/src/components/TerminalPanel.tsx - Task search
ui/src/components/SearchPane.tsx - Provider settings
ui/src/components/SettingsModal.tsx - Marketplace and automations
ui/src/components/MarketplacePane.tsx - UI state store
ui/src/store.ts - Command client
ui/src/tauri.ts - Desktop commands
src-tauri/src/ui.rs
Agent workflow
- Agent loop
src-tauri/src/agent.rs - Tool protocol
src-tauri/src/protocol.rs
Provider integrations
- Provider dispatch
src-tauri/src/providers.rs - Provider webview
src-tauri/src/webprov.rs - Provider adapters
src-tauri/src/adapters.rs - Injected adapter runtime
src-tauri/src/adapter_runtime.js - Provider bridge
src-tauri/src/bridge.rs
Workspace and safety
- Workspace file tools
src-tauri/src/tools.rs - Path confinement
src-tauri/src/workspace.rs - Command safety
src-tauri/src/sec.rs - Command execution
src-tauri/src/exec.rs
Local state and services
- Git checkpoints
src-tauri/src/checkpoints.rs - Task history
src-tauri/src/history.rs - Settings store
src-tauri/src/settings.rs - PTY sessions
src-tauri/src/terminal.rs
Other components
- User
- Provider web chat
- Ollama and LM Studio
Connections 37
- User → Application shell: uses
- Application shell → UI state store: loads and updates
ui/src/App.tsx - Application shell → Chat and composer: renders
ui/src/App.tsx - Application shell → Projects and tasks: renders
ui/src/App.tsx - Application shell → Workspace browser: renders
ui/src/App.tsx - User → Projects and tasks: manages projects
ui/src/components/Sidebar.tsx - Projects and tasks → Command client: invokes commands
ui/src/components/Sidebar.tsx - Chat and composer → Command client: invokes commands
ui/src/components/Chat.tsx - User → Provider settings: configures providers
- User → Workspace browser: browses files
- User → Terminal panel: uses terminal
- User → Task search: searches tasks
- User → Marketplace and automations: manages adapters
- Command client → Desktop commands: dispatches commands
- Desktop commands → Agent loop: starts tasks
src-tauri/src/ui.rs - Desktop commands → PTY sessions: manages sessions
src-tauri/src/ui.rs - Desktop commands → Settings store: reads and saves
src-tauri/src/ui.rs - Agent loop → Tool protocol: parses tool calls
src-tauri/src/agent.rs - Agent loop → Provider dispatch: sends prompts
src-tauri/src/agent.rs - Provider dispatch → Provider webview: dispatches web requests
src-tauri/src/providers.rs - Provider webview → Provider adapters: uses adapter
src-tauri/src/webprov.rs - Provider webview → Injected adapter runtime: injects runtime
- Injected adapter runtime → Provider web chat: drives page
- Provider webview → Provider bridge: relays messages
src-tauri/src/webprov.rs - Provider bridge → Agent loop: delivers replies
- Provider dispatch → Ollama and LM Studio: sends requests
- Agent loop → Chat and composer: requests approval
- Agent loop → Workspace file tools: executes tool calls
src-tauri/src/agent.rs - Workspace file tools → Path confinement: resolves confined paths
src-tauri/src/tools.rs - Agent loop → Command safety: checks commands
src-tauri/src/agent.rs - Agent loop → Command execution: runs commands
src-tauri/src/agent.rs - Command execution → Path confinement: uses workspace
src-tauri/src/exec.rs - Agent loop → Git checkpoints: snapshots writes
src-tauri/src/agent.rs - Agent loop → Task history: records transcripts
src-tauri/src/agent.rs - Provider settings → Settings store: loads and saves
- Task search → Command client: searches history
ui/src/components/SearchPane.tsx - Terminal panel → Command client: controls sessions
ui/src/components/TerminalPanel.tsx