Skip to content

Enhance documentation and fix skill invocation issues#39

Merged
chinkan merged 2 commits into
mainfrom
cursor/autopilot-supervisor-plan-0c7b
May 28, 2026
Merged

Enhance documentation and fix skill invocation issues#39
chinkan merged 2 commits into
mainfrom
cursor/autopilot-supervisor-plan-0c7b

Conversation

@chinkan
Copy link
Copy Markdown
Owner

@chinkan chinkan commented May 28, 2026

This pull request addresses UTF-8 byte-slice panics caused by unsafe string truncation in three Rust modules by introducing a shared, Unicode-safe truncation utility. The changes ensure that truncating strings with multi-byte characters (like Chinese or Japanese) no longer causes runtime panics, and they refactor duplicated logic into a reusable function. The update also adds comprehensive regression tests for multibyte inputs.

Core Improvements:

Bug Fixes for UTF-8 Safety:

  • Replaces all unsafe byte-indexed string slicing (e.g., &s[..N]) with a new Unicode-aware function, preventing panics on multi-byte characters in tool_notifier.rs, rag.rs, and query_rewriter.rs. [1] [2]

Refactoring and Code Reuse:

  • Extracts the UTF-8-safe truncate_chars function from tool_notifier.rs into a shared utility module src/utils/str.rs, and updates all affected modules to use this shared implementation.
  • Updates module declarations and imports to support the new utility (src/utils/mod.rs, src/main.rs).

Testing and Regression Coverage:

  • Adds new regression tests for each affected module to verify correct truncation and absence of panics with multibyte input, including Chinese text. Existing ASCII-only tests are supplemented with multibyte cases. [1] [2]
  • Ensures all new and existing tests pass, and code style/lint requirements are met. [1] [2]

Affected Modules:

These changes collectively eliminate a class of production panics on non

chinkan added 2 commits May 28, 2026 07:40
…th implementation

feat(docs): create plan for fixing skill invocation issues with code-interpreter and arxiv-daily-briefing

fix(src): update default system prompt to clarify loading of code-interpreter skill

fix(src): modify skill registry to treat skills with model or tools whitelist as subagents
Copilot AI review requested due to automatic review settings May 28, 2026 07:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 28, 2026

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@chinkan chinkan merged commit 3756f96 into main May 28, 2026
5 of 7 checks passed
@chinkan chinkan review requested due to automatic review settings May 28, 2026 07:39
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.

1 participant