Commit Graph

4 Commits

Author SHA1 Message Date
04f10d2794 feat: sunbeam reindex-code CLI verb + ReindexCode proto
Proto: ReindexCode RPC with org/repo/branch filters.
CLI: sunbeam reindex-code [--org studio] [--repo owner/name] [--endpoint ...]
Calls Sol's gRPC ReindexCode endpoint, prints indexed symbol count.
2026-03-24 09:38:02 +00:00
73d7d6c15b feat(code): tree-sitter symbol extraction + auto-indexing
Symbol extraction (symbols.rs):
- tree-sitter parsers for Rust, TypeScript, Python
- Extracts: functions, structs, enums, traits, classes, interfaces
- Signatures, docstrings, line ranges for each symbol
- extract_project_symbols() walks project directory
- Skips hidden/vendor/target/node_modules, files >100KB

Proto: IndexSymbols + SymbolEntry messages for client→server symbol relay

Client: after SessionReady, extracts symbols and sends IndexSymbols
to Sol for indexing into the code search index.

14 unit tests for symbol extraction across Rust/TS/Python.
2026-03-24 00:42:03 +00:00
8b4f187d1b feat(code): async agent bus, virtual viewport, event drain
- Agent service (crossbeam channels): TUI never blocks on gRPC I/O.
  Chat runs on a background tokio task, events flow back via bounded
  crossbeam channel. Designed as a library-friendly internal RPC.

- Virtual viewport: pre-wrap text with textwrap on content/width change,
  slice only visible rows for rendering. Paragraph gets no Wrap, no
  scroll() — pure O(viewport) per frame.

- Event drain loop: coalesce all queued terminal events before drawing.
  Filters MouseEventKind::Moved (crossterm's EnableMouseCapture floods
  these via ?1003h any-event tracking). Single redraw per batch.

- Conditional drawing: skip frames when nothing changed (needs_redraw).

- Mouse wheel + PageUp/Down + Home/End scrolling, command history
  (Up/Down, persistent to .sunbeam/history), Alt+L debug log overlay.

- Proto: SessionReady now includes history entries + resumed flag.
  Session resume loads conversation from Matrix room on reconnect.

- Default model: devstral-small-latest (was devstral-small-2506).
2026-03-23 15:57:15 +00:00
f3e67e589b feat(code): add sunbeam-proto crate with gRPC service definition
shared protobuf definitions for the sunbeam code agent:
- CodeAgent service with bidirectional Session streaming
- ClientMessage: StartSession, UserInput, ToolResult, ToolApproval
- ServerMessage: TextDelta, ToolCall, ApprovalNeeded, Status
- ToolDef for client-side tool registration

this is the transport layer between `sunbeam code` (TUI client)
and Sol (server-side agent loop). next: JWT middleware for OIDC
auth, Sol gRPC server stub, CLI subcommand stub.
2026-03-23 11:12:51 +00:00