Skip to content

feat(cli): add standalone ov watch subcommand#1841

Open
yeyitech wants to merge 6 commits intovolcengine:mainfrom
yeyitech:feat/ov-watch-command
Open

feat(cli): add standalone ov watch subcommand#1841
yeyitech wants to merge 6 commits intovolcengine:mainfrom
yeyitech:feat/ov-watch-command

Conversation

@yeyitech
Copy link
Copy Markdown
Contributor

@yeyitech yeyitech commented May 2, 2026

Summary

  • Add ov watch subcommand group with list, add, remove, and set subcommands
  • Watch tasks are persisted in ~/.openviking/watches.json, decoupled from add-resource processing
  • ov watch add <path> [--to <uri>] [--interval <seconds>] registers a path without triggering re-indexing
  • ov watch set <path> --interval <seconds> updates the polling interval without re-processing resources
  • ov watch remove <path> removes a watch entry
  • ov watch list shows all configured watches with path, target URI, interval, and timestamps

Closes #1662

Test plan

  • ov watch list shows empty table when no watches configured
  • ov watch add /tmp/mydir --to viking://resources/mydir --interval 60 adds entry to watches.json
  • ov watch list shows the new entry
  • ov watch set /tmp/mydir --interval 120 updates interval without re-indexing
  • ov watch remove /tmp/mydir removes the entry
  • Duplicate ov watch add for same path raises clear error

🤖 Generated with Claude Code

yeyitech and others added 6 commits May 2, 2026 09:11
…teError (volcengine#1758)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…h embedded credentials (volcengine#1734)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mary customization (volcengine#578)

Thread a new `summary_instruction` parameter from the CLI option
`--summary-instruction` through the full pipeline: CLI command →
BaseClient/HTTPClient/LocalClient → HTTP router → ResourceService →
ResourceProcessor → TreeBuilder → SemanticMsg.instruction, so
SemanticProcessor can use it when generating per-file abstracts and
directory overviews via VLM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…templates (volcengine#578)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
volcengine#1662)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🏅 Score: 60
🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 Multiple PR themes

Sub-PR theme: Add standalone ov watch subcommand

Relevant files:

  • openviking_cli/cli/commands/watch.py
  • openviking_cli/cli/commands/init.py

Sub-PR theme: Add summary_instruction parameter for custom semantic generation

Relevant files:

  • openviking/client/local.py
  • openviking/server/routers/resources.py
  • openviking/service/resource_service.py
  • openviking/parse/tree_builder.py
  • openviking/storage/queuefs/semantic_dag.py
  • openviking/storage/queuefs/semantic_msg.py
  • openviking/storage/queuefs/semantic_processor.py
  • openviking/utils/resource_processor.py
  • openviking/prompts/templates/semantic/code_summary.yaml
  • openviking/prompts/templates/semantic/document_summary.yaml
  • openviking/prompts/templates/semantic/file_summary.yaml
  • openviking/prompts/templates/semantic/overview_generation.yaml
  • openviking_cli/cli/commands/resources.py
  • openviking_cli/client/base.py
  • openviking_cli/client/http.py

Sub-PR theme: Explicitly disable streaming in OpenAI VLM calls

Relevant files:

  • openviking/models/vlm/backends/openai_vlm.py

Sub-PR theme: Generalize repo URL normalization to all hosts

Relevant files:

  • openviking/parse/parsers/code/code.py

Sub-PR theme: Improve rerank client handling of empty documents and responses

Relevant files:

  • openviking_cli/utils/rerank.py

⚡ Recommended focus areas for review

Critical syntax error due to malformed docstring

The docstring closing quote is concatenated with result = { on the same line, causing invalid Python syntax. This will prevent the module from importing entirely.

"""        result = {
Incorrect license header

New file uses Apache-2.0 instead of required AGPL-3.0 license header per project conventions.

# SPDX-License-Identifier: Apache-2.0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix broken docstring in resource processor

The docstring closing triple quote was accidentally removed, causing the result
dictionary initialization to be interpreted as part of the docstring. This will lead
to a NameError when the function tries to use result. Restore the docstring
termination and move result = { back to code.

openviking/utils/resource_processor.py [88]

 Process and store a new resource.
 
     Workflow:
     1. Parse source (writes to temp directory)
     2. TreeBuilder moves to AGFS
     3. SemanticQueue generates L0/L1 and vectorizes asynchronously
-    """        result = {
+    """
+    result = {
Suggestion importance[1-10]: 9

__

Why: This fixes a critical syntax error where the docstring was not properly closed, causing the result dictionary to be part of the docstring and leading to a NameError.

High

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Feature]: 建议添加独立的 "ov watch" 命令

1 participant