Repository navigation
SHAI v0.2.1 - #118
Merged
Merged
SHAI v0.2.1#118
Conversation
Move SessionPersist and SessionData from shai-http to shai-core so they can be reused by the CLI. Update imports in shai-http session modules accordingly.
Add memory_write and memory_read tools that persist project facts to .shai/memory.md. Register them in the agent builder and tool module.
Add skill discovery and a skill tool for loading on-demand procedural instructions from .shai/skills/ and ~/.config/shai/skills/. Migrate project context from SHAI.md to AGENTS.md convention while keeping SHAI.md as a legacy override. Add find_git_root() helper to walk up to the nearest .git directory.
Add a status bar showing model/provider/token usage, a conversation history buffer, command autocomplete with '/' prefix, keyboard shortcuts (Ctrl+T, Ctrl+V, Alt+Enter), and /restore command for session persistence and restoration. Remove unused cmdnav module.
Add green/red ANSI coloring for added/removed lines in diff previews shown by the pretty formatter.
Cast handle_sigwinch to *const () before converting to usize to satisfy the sa_sigaction field type on platforms where it differs.
Add comprehensive skills documentation covering creation, discovery, and usage. Add project roadmap.
Bump version to 0.2.0 with new features: memory tools, skills system, TUI improvements, and AGENTS.md support.
Add exponential backoff retry mechanism for chat and chat_stream requests. Retries cover network errors, 5xx responses, and deserialization errors. Max retries configurable via SHAI_LLM_MAX_RETRIES env var.
Replace loose 'contains' checks with exact path matching and proper directory prefix matching. Wildcard patterns now use starts_with/ends_with instead of contains for more accurate filtering.
- Wire status bar to display agent model, provider, and state - Add render_restored_trace to display loaded conversations in TUI - Suppress agent banner when terminal is already initialized - Restore keyboard enhancement flags on exit - Update helper text and status bar colors for better visibility
Add ability to restore a previous session by ID or most-recent from both CLI (--restore/--latest) and TUI (/restore, /latest). Includes LoadTrace agent protocol command, session filtering for empty traces, and trace rendering in the TUI.
Document the workspace crate directory/package name mapping to clarify usage of cargo -p commands.
Enforce consistent formatting and import ordering across the entire codebase.
- improve bash tools behaviour to default to cwd
* benchmark are more complexe, with four evaluation tasks
- limit max tools usage per turn - avoid running duplicate command - compact session - Force batch fix, instead of re-running check at every change
- Add compaction on agent/skills
- support for hash based editing - support multi write - auto verification on edit
Add a session picker component for browsing and restoring saved sessions. Wire it up in the TUI module and update session persistence to support it.
Add location, git branch, and agent mode display to the status bar. Update command handling and helper references accordingly.
Add AgentMode enum and cycling logic in the TUI input handler. Enforce plan mode in ClaimManager and update the coder prompt and runner to support plan mode behavior.
Add import module to import configs from Claude (CLAUDE.md) and Cursor (.cursorrules/.cursor/rules) into AGENTS.md. Wire up the import subcommand in the CLI entry point.
Refactor agent loop, builder, and event handling. Update coder and searcher runners, memory tools, and function-calling client to align with the new agent architecture.
Add documentation for session picker, status bar fields, plan mode, config import, and updated architecture notes.
- use .json extension so tools can load the correct parser - rename auth.config to auth.config.json - rename agent.config to agent.config.json - support for shortcut configuration in tui.config.json - deprecate env var shortcuts - document configuration files
- factor tools declaration - add mcp manager in tui - add /tools command to list all registered tools - add /mcp to show mcp server and their connection status
Break up the App God class into focused, testable components: - AgentHandler trait for event-driven subsystem communication - AgentState groups tool_tracker, token_counter, permission_manager, session_manager, and mcp_manager behind a single fan-out point - RenderManager owns history + formatter, implements AgentHandler - AgentMeta groups agent model/provider/name metadata - UiState groups modal_state, session_picker, and exit flag - Extract key handling into key_handler.rs - Move theme ownership into StatusBar - Remove dead custom_agent field
Not shown in auto/fc mode, but shown with fc2/so function mode
- cli-clipboard was deprecated
- Add /session (session picker) and /pwd (working directory) commands - Fix /mcp, /skills, /tools rendering by removing dead clear/insert_before calls (no-op for Viewport::Fullscreen) and adding empty-state guards - Fix /auth black page by dropping terminal before LeaveAlternateScreen and removing terminal.clear() that blocked on EventStream mutex - Fix session/agent picker transparency with Clear widget + background fill - Fix ? help tab spacing (replaced \t with padded formatting) - Change /tokens from status bar notification to rendered text block - Add ◆ system message marker with add_system_text for command outputs
- change ctrl+x to alt+x for preview
- usage.input_tokens_details was merged into prompt_tokens_details - ChatMessage::Assistant initializers require the new reasoning field
There was a problem hiding this comment.
🟡 Changes recommended
Multiple correctness and security issues affect session paths, verification, file editing, compaction, and TUI behavior.
18 open findings
Validate session IDs before filesystem access · New Make multi-file edits atomic · New Report verifier failures from nonzero exit status · New Display active TUI shortcut configuration · New Avoid duplicating formatted agent errors · New Use a valid message relationship for verification diagnostics · New Persist configuration derived from legacy environment variables · New Preserve Unicode characters during ANSI compaction · New Preserve matching error lines during compaction · New Hash the original line, not truncated display text · New Avoid underflow when no lines are available · New Pass edited files to verification commands · New Register memory tools in the tool factory · New Include shai-http in the Cargo.toml release list · New Correct the documented OVH AI API key name · New Correct the documented OVH API key name · New Include shai-http in the release checklist · New Include shai-http in the crate manifest checklist · New
What changed in this PR
This release consolidates SHAI 0.2.1, expanding the TUI, agent tooling, session handling, configuration, and documentation while updating workspace crate versions.
Changes:
- Refactors the TUI with configurable shortcuts, pickers, status rendering, and clipboard/ratatui updates.
- Adds batched filesystem tools, hash edits, compaction, verification, memory, skills, prompts, and session persistence.
- Updates HTTP/LLM integrations, release metadata, documentation, and examples.
| File | Description |
|---|---|
SHAI.md |
Removes legacy guide. |
AGENTS.md |
Adds repository guidance. |
.gitignore |
Ignores benchmark outputs. |
Cargo.toml |
Removes ratatui patch. |
shai-macros/Cargo.toml |
Bumps crate version. |
shai-llm/Cargo.toml |
Bumps version and adds tracing. |
shai-llm/src/lib.rs |
Reorganizes exports. |
shai-llm/src/chat.rs |
Formats chat hooks. |
shai-llm/src/logging.rs |
Uses tracing for logs. |
shai-llm/src/provider.rs |
Formats provider API. |
shai-llm/src/tool/mod.rs |
Reorders tool exports. |
shai-llm/src/tool/tool.rs |
Cleans tool definitions. |
shai-llm/src/tool/call.rs |
Refactors tool dispatch. |
shai-llm/src/tool/call_fc_auto.rs |
Handles empty toolboxes. |
shai-llm/src/tool/call_fc_required.rs |
Refactors required calls. |
shai-llm/src/providers/mod.rs |
Reorders providers. |
shai-llm/src/providers/models.rs |
Formats model errors. |
shai-llm/src/providers/openai.rs |
Formats OpenAI provider. |
shai-llm/src/providers/openai_compatible.rs |
Formats compatible provider. |
shai-llm/src/providers/ollama.rs |
Formats Ollama provider. |
shai-llm/src/providers/ovhcloud.rs |
Formats OVHcloud provider. |
shai-llm/src/providers/openrouter/mod.rs |
Cleans export. |
shai-llm/src/providers/openrouter/api.rs |
Formats conversion API. |
shai-llm/src/providers/anthropic/mod.rs |
Reorders modules. |
shai-llm/src/providers/anthropic/api.rs |
Cleans imports. |
shai-llm/src/examples/basic_query.rs |
Formats basic example. |
shai-llm/src/examples/query_with_history.rs |
Formats history example. |
shai-llm/src/examples/streaming_query.rs |
Formats streaming example. |
shai-http/Cargo.toml |
Bumps crate version. |
shai-http/src/lib.rs |
Reorganizes exports. |
shai-http/src/http.rs |
Formats server routes. |
shai-http/src/error.rs |
Formats error responses. |
shai-http/src/streaming.rs |
Formats SSE handling. |
shai-http/src/session/mod.rs |
Uses core persistence. |
shai-http/src/session/persist.rs |
Removes duplicate persistence. |
shai-http/src/session/session.rs |
Formats session handling. |
shai-http/src/session/lifecycle.rs |
Uses shared persistence. |
shai-http/src/session/logger.rs |
Formats event logging. |
shai-http/src/apis/mod.rs |
Reorders APIs. |
shai-http/src/apis/simple/mod.rs |
Reorders simple API. |
shai-http/src/apis/simple/types.rs |
Adds enum lint allowances. |
shai-http/src/apis/simple/handler.rs |
Formats session routing. |
shai-http/src/apis/simple/formatter.rs |
Formats event API. |
shai-http/src/apis/openai/mod.rs |
Reorders exports. |
shai-http/src/apis/openai/completion/mod.rs |
Reorders modules. |
shai-http/src/apis/openai/completion/formatter.rs |
Formats completion output. |
shai-http/src/apis/openai/response/mod.rs |
Reorders modules. |
shai-http/src/apis/openai/response/types.rs |
Formats response types. |
shai-http/src/apis/openai/response/formatter.rs |
Formats response events. |
shai-core/Cargo.toml |
Adds parser dependencies and version. |
shai-core/src/lib.rs |
Exposes sessions and modules. |
shai-core/src/config/mod.rs |
Exposes TUI configuration. |
shai-core/src/config/tui.rs |
Implements shortcut configuration. |
shai-core/src/session/mod.rs |
Exposes persistence. |
shai-core/src/session/persist.rs |
Centralizes saved sessions. |
shai-core/src/tools/mod.rs |
Adds tool factory and modules. |
shai-core/src/tools/frontmatter.rs |
Parses markdown frontmatter. |
shai-core/src/tools/prompts/mod.rs |
Exposes prompt discovery. |
shai-core/src/tools/skills/mod.rs |
Exposes skill discovery. |
shai-core/src/tools/memory/mod.rs |
Exposes memory support. |
shai-core/src/tools/memory/structs.rs |
Defines memory parameters. |
shai-core/src/tools/memory/memory.rs |
Implements memory tools. |
shai-core/src/tools/todo/mod.rs |
Reorders exports. |
shai-core/src/tools/todo/structs.rs |
Adds storage default. |
shai-core/src/tools/todo/todo.rs |
Improves todo output. |
shai-core/src/tools/bash/mod.rs |
Reorders exports. |
shai-core/src/tools/bash/structs.rs |
Cleans imports. |
shai-core/src/tools/bash/tests.rs |
Formats tests. |
shai-core/src/tools/fetch/mod.rs |
Reorders exports. |
shai-core/src/tools/fetch/structs.rs |
Cleans imports. |
shai-core/src/tools/fetch/fetch.rs |
Adds default implementation. |
shai-core/src/tools/fetch/tests.rs |
Cleans formatting. |
shai-core/src/tools/mcp/mod.rs |
Reorders MCP modules. |
shai-core/src/tools/mcp/mcp.rs |
Formats MCP abstraction. |
shai-core/src/tools/mcp/mcp_config.rs |
Formats client factory. |
shai-core/src/tools/mcp/mcp_http.rs |
Formats HTTP transport. |
shai-core/src/tools/mcp/mcp_oauth.rs |
Cleans OAuth flow. |
shai-core/src/tools/mcp/mcp_sse.rs |
Formats SSE transport. |
shai-core/src/tools/mcp/mcp_stdio.rs |
Formats stdio transport. |
shai-core/src/tools/fs/mod.rs |
Adds hash, symbols, verification. |
shai-core/src/tools/fs/hash.rs |
Adds line hashing. |
shai-core/src/tools/fs/verification.rs |
Adds post-edit verification. |
shai-core/src/tools/fs/symbol/mod.rs |
Exposes symbol extraction. |
shai-core/src/tools/fs/read/mod.rs |
Exposes batched read types. |
shai-core/src/tools/fs/read/structs.rs |
Defines batched reads. |
shai-core/src/tools/fs/read/read.rs |
Implements hashed batched reads. |
shai-core/src/tools/fs/write/mod.rs |
Exposes batched writes. |
shai-core/src/tools/fs/write/structs.rs |
Defines batched writes. |
shai-core/src/tools/fs/write/tests.rs |
Tests multi-file writes. |
shai-core/src/tools/fs/edit/mod.rs |
Exposes batched edits. |
shai-core/src/tools/fs/edit/structs.rs |
Defines hash-based edits. |
shai-core/src/tools/fs/edit/edit.rs |
Implements atomic-style edits. |
shai-core/src/tools/fs/find/mod.rs |
Reorders exports. |
shai-core/src/tools/fs/find/structs.rs |
Formats find types. |
shai-core/src/tools/fs/ls/mod.rs |
Reorders exports. |
shai-core/src/tools/fs/ls/structs.rs |
Cleans formatting. |
shai-core/src/tools/fs/multiedit/mod.rs |
Removes obsolete tool. |
shai-core/src/tools/fs/multiedit/structs.rs |
Removes old parameters. |
shai-core/src/tools/fs/multiedit/tests.rs |
Removes old tests. |
shai-core/src/runners/mod.rs |
Adds shared test helpers. |
shai-core/src/runners/coder/mod.rs |
Reorders modules. |
shai-core/src/runners/searcher/mod.rs |
Reorders modules. |
shai-core/src/runners/searcher/prompt.rs |
Formats prompt generation. |
shai-core/src/runners/searcher/searcher.rs |
Updates brain interface. |
shai-core/src/runners/gerund/mod.rs |
Reorders modules. |
shai-core/src/runners/gerund/prompt.rs |
Cleans prompt source. |
shai-core/src/runners/gerund/gerund.rs |
Refactors LLM request. |
shai-core/src/runners/clifixer/mod.rs |
Reorders modules. |
shai-core/src/runners/clifixer/prompt.rs |
Formats prompt generation. |
shai-core/src/runners/clifixer/fix.rs |
Refactors structured response. |
shai-core/src/runners/compacter/mod.rs |
Exposes compaction layers. |
shai-core/src/runners/compacter/compact.rs |
Adds tool compaction. |
shai-core/src/runners/compacter/ansi.rs |
Adds ANSI stripping. |
shai-core/src/runners/compacter/generic.rs |
Adds generic truncation. |
shai-core/src/agent/mod.rs |
Reorganizes agent exports. |
shai-core/src/agent/error.rs |
Cleans formatting. |
shai-core/src/agent/states/mod.rs |
Reorders state modules. |
shai-core/src/agent/states/states.rs |
Adds state display. |
shai-core/src/agent/states/starting.rs |
Uses shared tool context. |
shai-core/src/agent/states/running.rs |
Formats state handling. |
shai-core/src/agent/states/processing.rs |
Runs post-edit verification. |
shai-core/src/agent/states/pause.rs |
Formats pause handling. |
shai-core/src/agent/states/terminal.rs |
Simplifies terminal handling. |
shai-core/src/agent/output/mod.rs |
Reorders output exports. |
shai-core/src/agent/output/stdout.rs |
Cleans imports. |
shai-core/src/agent/output/log.rs |
Extends event logging. |
shai-core/examples/AGENTS.md |
Adds example agent guidance. |
shai-core/examples/oauth_test.rs |
Cleans formatting. |
shai-core/examples/prompts/caveman.md |
Adds concise prompt. |
shai-core/examples/scripts/bugfix.json |
Adds bugfix benchmark. |
shai-core/examples/scripts/feature.json |
Adds feature benchmark. |
shai-core/examples/scripts/refactor.json |
Adds refactor benchmark. |
shai-core/examples/scripts/search.json |
Adds search benchmark. |
shai-core/examples/skills/code-review/SKILL.md |
Adds review skill example. |
shai-core/examples/skills/debugging/SKILL.md |
Adds debugging skill. |
shai-core/examples/skills/git-workflow/SKILL.md |
Adds Git workflow skill. |
shai-core/examples/skills/refactoring/SKILL.md |
Adds refactoring skill. |
shai-core/examples/skills/release/SKILL.md |
Adds release skill. |
shai-core/examples/skills/rust-lint/SKILL.md |
Adds lint skill. |
shai-core/examples/skills/testing/SKILL.md |
Adds testing skill. |
shai-cli/Cargo.toml |
Updates TUI dependencies/version. |
shai-cli/src/fc/mod.rs |
Reorders modules. |
shai-cli/src/headless/mod.rs |
Reorders modules. |
shai-cli/src/shell/mod.rs |
Cleans formatting. |
shai-cli/src/shell/terminal.rs |
Cleans terminal handling. |
shai-cli/src/tui/mod.rs |
Exposes new TUI components. |
shai-cli/src/tui/agent_meta.rs |
Tracks agent metadata. |
shai-cli/src/tui/auth/mod.rs |
Reorders auth modules. |
shai-cli/src/tui/auth/config_providers.rs |
Refactors provider modal. |
shai-cli/src/tui/cmdnav.rs |
Removes empty navigator. |
shai-cli/src/tui/handler.rs |
Adds event handler trait. |
shai-cli/src/tui/helper.rs |
Generates command/shortcut help. |
shai-cli/src/tui/mcp_manager.rs |
Tracks MCP status. |
shai-cli/src/tui/modal.rs |
Adds alternate-screen modals. |
shai-cli/src/tui/perm_manager.rs |
Queues permission requests. |
shai-cli/src/tui/renderer.rs |
Manages conversation rendering. |
shai-cli/src/tui/session_manager.rs |
Tracks active session. |
shai-cli/src/tui/shortcuts.rs |
Maps configured shortcuts. |
shai-cli/src/tui/token_counter.rs |
Tracks token usage. |
shai-cli/src/tui/ui_state.rs |
Centralizes UI state. |
docs/benchmarks.md |
Documents benchmark harness. |
docs/configurations/agents.md |
Documents agent configuration. |
docs/configurations/auth.md |
Documents auth configuration. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
Great contribution ! thanks :) |
IgorOffline
pushed a commit
to IgorOffline/ovh-shai
that referenced
this pull request
Oct 10, 2026
- docs: fix OVHAI_API_KEY typo to OVH_API_KEY in agents/auth examples - docs: add shai-http to the release version checklists - tui: help panel now shows the active shortcut configuration - tui: render agent errors once instead of twice in history - config: persist env-derived tui.config.json on first launch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



v0.2.1
This version focus on improving the TUI with new feature and fixes.
Interface (TUI)
Fix
and removing terminal.clear() that blocked on EventStream mutex
calls (no-op for Viewport::Fullscreen) and adding empty-state guards
v0.2.0
This version focus on general improvement on SHAI, include SKILLS and AGENTS.md support, general improvement on agent harness, auto/plan mode and session restoration
Breaking change/deprecation
Agent feature
Interface (TUI)
Harness
Fix