Commit Graph
4 Commits
Author SHA1 Message Date
Qin Haojie 7abd6ab249 refactor(client): remove Python embedded mode (#3712)
* refactor(client): remove Python embedded mode

Consolidate Python consumers on the HTTP SDK while keeping shared server and storage capabilities unchanged.

* refactor(client): remove obsolete embedded leftovers
2026-08-10 18:00:00 +08:00
MaojiaSheng db7319f4a2 refactor: to accelerate cli launch speed, refactor openviking_cli dir (#150)
* fix: remove await asyncio and call agfs directly

* feat: mv cli out of openviking

* refactor: mv cli out of openviking

* refactor: mv cli out of openviking
2026-02-12 22:12:50 +08:00
Zayn Jarvis a5cf17b646 feat: in chatmem example, add /time and /add_resource command (#77)
* docs: add design for /time and /add_resource commands

Design document for two new chatmem features:
- /time command: display performance timing breakdown
- /add_resource command: add documents during chat sessions

Includes architecture, detailed implementation plan, and UX examples.

* feat: add resource manager shared module

- create_client(): initialize OpenViking client
- add_resource(): add files/URLs to database with progress
- Extracted from add.py for reusability

* refactor: simplify add.py using resource manager

- Use shared create_client() and add_resource()
- Reduces duplication, maintains same CLI behavior
- ~80 lines reduced to ~40 lines

* test: document manual testing results

* docs: document /time and /add_resource commands in README

* docs: add implementation plan for /time and /add_resource

* feat: add timing instrumentation to Recipe.query()

- Track search_time, llm_time, total_time with perf_counter
- Return timing data in result dict under 'timings' key
- No breaking changes to existing API

* feat: add /time command handler

- Parse /time <question> syntax
- Extract question and call ask_question with show_timing=True
- Show usage help if no question provided

* feat: add timing display to ask_question

- Accept show_timing parameter (default False)
- Display timing panel with search/LLM/total times
- Format times as seconds with 3 decimal places

* docs: update help text with /time and /add_resource commands

* feat: add /add_resource command handler

- Parse /add_resource <path> syntax
- Expand user paths (~/ notation)
- Use shared resource_manager module
- Show spinner during processing
- Immediate feedback when complete

* docs: implementation complete summary

* feat: support add resource and time command

* roll: some unexpected changes

* roll: some unexpected changes

* chore: remove chat since dups

* chore: help msg update

* feat: update README for chatmem

* feat: update diff lint

* fix: use original changed files

* fix: filter py files

* fix: remove deleted file
2026-02-06 19:20:30 +08:00
Liu Zhiheng 74ea0f95f6 feat: chat & chat w/ mem examples (#39)
* docs(chat): add OpenViking chat application design

- REPL-style chat interface with rich terminal UI
- Client-server architecture (port 8391)
- Automatic RAG for context-aware responses
- Auto-commit sessions on exit
- Modular structure for multi-agent development

chore: add .worktrees to gitignore

docs: add chat examples design document

- Phase 1: Multi-turn chat interface (no persistence)
- Phase 2: Chat with session memory using OpenViking Session API
- Detailed architecture, implementation plan, and testing strategy

* docs(chat): add detailed implementation plan for Phase 1

- 9 bite-sized tasks with exact code
- TDD approach with manual testing
- Frequent commits after each task
- Complete REPL implementation
- Handoff document for Phase 2

* feat(chat): create directory structure with symlinks to query example

* fix(chat): remove broken data symlink - data directory is runtime artifact

* feat(chat): implement ChatSession for in-memory history

* docs: add agent handoff document for continuing implementation

- Complete task specifications for Tasks 3-9
- Subagent-driven development instructions
- Current status summary (Tasks 1-2 complete)
- Code examples and test procedures
- Entry point for next agent

* feat(chat): add ChatREPL class skeleton with signal handling

* feat(chat): implement welcome banner, help, and command handling

* feat(chat): implement question/answer display with sources

* feat(chat): implement main REPL loop with readline support

* fix(chat): chat func declaration

* feat(chat): support multi-run chat and tested

* fix(chat): interupt, remove debug log, move doc

* docs(chatmem): add Phase 2 implementation plan

- 11 detailed tasks with exact code
- Session API integration steps
- Message recording and commit procedures
- Testing and verification checklist
- Comprehensive documentation plan
- Success criteria for completion

* feat(chatmem): create Phase 2 directory from chat example

- Copy examples/chat/ to examples/chatmem/
- Update pyproject.toml name to chatmem
- Base for Session API integration

* refactor(chatmem): remove ChatSession, add Session API imports

- Remove in-memory ChatSession class
- Add OpenViking Session API imports
- Prepare for Session integration

* feat(chatmem): initialize OpenViking client and Session

- Add session_id parameter to ChatREPL.__init
- Initialize SyncOpenViking client in run()
- Create/load Session with session_id
- Display session info if continuing from previous
- Keep Recipe initialization

* feat(chatmem): record user and assistant messages to Session

- Add user message before query
- Add assistant message after response
- Remove old in-memory add_turn() call
- Messages now persist in Session

* feat(chatmem): commit session on exit with memory extraction

- Update _signal_handler to commit on Ctrl-C
- Update run() finally block to commit on normal exit
- Display memory extraction count
- Handle commit errors gracefully
- Session persists to data/session/

* feat(chatmem): add --session-id command line argument

- Add --session-id flag to specify session
- Default: chat-interactive
- Update help text to mention persistent memory
- Pass session_id to ChatREPL

* docs(chatmem): add comprehensive README with memory features

- Document session persistence behavior
- Explain memory extraction process
- Show session management examples
- Compare with examples/chat/
- Add troubleshooting section
- Include architecture diagrams

* docs(chatmem): add detailed comparison with chat example

- Side-by-side feature comparison
- Use case recommendations
- Code differences
- Storage structure comparison
- Performance considerations
- Migration path examples

* test(chatmem): add comprehensive test results

- Session creation/loading verified
- Message recording tested
- Memory extraction confirmed
- Multiple sessions working
- Error handling tested
- All commands functional

* feat(chatmem): Phase 2 complete - persistent memory implementation

Complete Features:
- Session persistence using OpenViking Session API
- Automatic message recording (user + assistant)
- Session commit on exit with memory extraction
- Previous session loading on startup
- Multiple independent sessions (--session-id)
- Comprehensive documentation and testing

Architecture:
- OpenViking SyncClient for storage
- Session API for message management
- Memory extraction on commit
- Session storage in data/session/

Testing:
- All functionality verified
- Multiple sessions tested
- Error handling confirmed
- Memory extraction working

Ready for production use.

* fix(chatmem): session API

* fix(chatmem): retrieve memory from FindResult

* feat(chatmem): aggregate chatmem docs

* refactor: replace symlink with common pkg
2026-02-04 10:31:03 +08:00