Skip to content

feat(opencode): update plugin#678

Merged
chenjw merged 2 commits intovolcengine:mainfrom
yangxinxin-7:feat/update_plugin
Mar 17, 2026
Merged

feat(opencode): update plugin#678
chenjw merged 2 commits intovolcengine:mainfrom
yangxinxin-7:feat/update_plugin

Conversation

@yangxinxin-7
Copy link
Copy Markdown
Collaborator

  • Fix OV_CONF undefined reference (runtime crash)
  • Fix installSkill() silently swallowing errors
  • Add concurrency guard for init() to prevent double server start
  • Drop redundant --config ~/.openviking/ov.conf (it's the default path)
  • Remove legacy openviking-context.ts (caused double system prompt injection in local plugin mode)
  • Translate all messages and comments to English

@chenjw
Copy link
Copy Markdown
Collaborator

chenjw commented Mar 17, 2026

@claude review一下

// ── Skill auto-install ────────────────────────────────────────────────────────

function installSkill() {
const src = join(__dirname, "skills", "openviking", "SKILL.md")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] The toast helper is defined identically here and again inside OpenVikingPlugin(). Consider extracting it into a shared factory, e.g.:

function makeToast(client) {
  return (message, variant = "warning") =>
    client.tui.showToast({
      body: { title: "OpenViking", message, variant, duration: 8000 },
    }).catch(() => {})
}

Then call const toast = makeToast(client) in both places. This avoids duplication and ensures both call sites stay in sync.

## Error Handling

**`command not found: ov`** → Tell user: `pip install openviking --upgrade --force-reinstall`. Stop.
**`command not found: ov`** → Tell user: `pip install openviking --upgrade`. Stop.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] This line now reads pip install openviking --upgrade (without --force-reinstall), but README.md line 10 still says pip install openviking --upgrade --force-reinstall. Consider updating the README in this PR as well to keep both documents consistent.

ov <command> --help # e.g. ov find --help
```
ov <command> --help # e.g. ov search --help
``` No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Suggestion] Missing newline at end of file. This causes \ No newline at end of file in diffs and doesn't conform to POSIX text file conventions. Adding a trailing newline avoids unnecessary diff noise in future changes.

- Extract toast helper into makeToast(client) to avoid duplication
- Align pip install command across README and SKILL.md
- Add missing newline at end of SKILL.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@chenjw chenjw merged commit a8dfad0 into volcengine:main Mar 17, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants