Skip to content

feat: in chatmem example, add /time and /add_resource command#77

Merged
qin-ctx merged 23 commits intovolcengine:mainfrom
ZaynJarvis:feat/time_and_add
Feb 6, 2026
Merged

feat: in chatmem example, add /time and /add_resource command#77
qin-ctx merged 23 commits intovolcengine:mainfrom
ZaynJarvis:feat/time_and_add

Conversation

@ZaynJarvis
Copy link
Collaborator

Description

add examples' capability

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

image

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.
- create_client(): initialize OpenViking client
- add_resource(): add files/URLs to database with progress
- Extracted from add.py for reusability
- Use shared create_client() and add_resource()
- Reduces duplication, maintains same CLI behavior
- ~80 lines reduced to ~40 lines
- 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
- Parse /time <question> syntax
- Extract question and call ask_question with show_timing=True
- Show usage help if no question provided
- Accept show_timing parameter (default False)
- Display timing panel with search/LLM/total times
- Format times as seconds with 3 decimal places
- Parse /add_resource <path> syntax
- Expand user paths (~/ notation)
- Use shared resource_manager module
- Show spinner during processing
- Immediate feedback when complete
@ZaynJarvis
Copy link
Collaborator Author

image

@ZaynJarvis
Copy link
Collaborator Author

chat/ example is removed

  1. less ambiguity
  2. no future maintenance planning

@qin-ctx qin-ctx merged commit a5cf17b into volcengine:main Feb 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants