feat: Codetether chat sidebar, SRP refactor tool, and session orchestration #24
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
RustyRoad/rusty-refactor!24
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/enhance-llm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This branch introduces the Codetether chat sidebar, an SRP modular refactor tool, a session transcript loading pipeline, and a richer sub-agent activity panel.
Commits
Core features
SrpRefactorTool,srp_refactor_tool.ts).CodetetherChatViewProvider) with model selection, session management, speech/TTS, voice input, and sub-agent activity display. Also adds native Rust TTS/STT via NAPI bridge and fixes E2BIG argument-length errors.aiDocGeneratorcommand that generates documentation tailored to the detected language.Enhancements
TTS modularization
chat-sidebar-tts.jsinto focused modules:tts-buttons.js,tts-voice.js, and coretts.js.Session transcript loading
CodetetherSessionOpenService,CodetetherSessionTranscript,CodetetherSessionFileTranscript,CodetetherSessionLoader, andCodetetherSessionViewLoaderclasses. Webview gainsclearMessagesstate action andsessionLoadedhandler.Sub-agent activity panel
snapshot()method for on-demand refresh.Model discovery
BUILT_IN_MODELSconstant andgetModelListFallbacks(). Run timeout increased from 10 to 30 minutes.Files changed
src/,src/sidebar/,media/,rust-backend/tts.rs,stt.rs)package.json,Cargo.toml, build scriptsTest plan
Pull request overview
Adds a Codetether-backed chat sidebar and refactors the Module Extractor webview UI, alongside native/NAPI and tooling updates intended to avoid CLI ARG_MAX (E2BIG) issues and improve build/publish flows.
Changes:
Reviewed changes
Copilot reviewed 65 out of 71 changed files in this pull request and generated 7 comments.
Show a summary per file
ready.nodeandvscodetypes for TypeScript compilation..nodefilename(s).extract_workspace_rootNAPI-exported path utility..nodefilename during publish.💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The package includes only win32-x64 and linux-x64 NAPI binaries, but the runtime loader also searches for linux-arm64 and darwin artifacts. Either include the additional
.nodebinaries here (and in the build/publish pipeline) or remove the extra candidates so installs on those platforms fail fast with a clear message.npm run buildrunsbuild:napi(cargo build) but does not run the newscripts/copy-napi.jsstep, so the platform-specific.nodefile thatsrc/nativeBridge.tslooks for may not be produced during local builds. Consider chainingnode scripts/copy-napi.jsafterbuild:napi(or as a postbuild step) so the JS loader and build scripts stay in sync.@ -13,2 +18,4 @@codetether-agent = { path = "../../../programming/codetether-agent", optional = true }serde_json = "1.0.149"[build-dependencies]The napi_bridge crate depends on
codetether-agentvia a relative path (../../../programming/codetether-agent), but that directory does not exist in this repository. This will breakcargo buildin CI and for other contributors. Consider switching to a workspace member, a git/crates.io dependency, or making the dependency optional behind a feature so builds don’t require an external checkout.codetetherListModelsNative()checks fornative.codetetherListModels, but napi-rs exports functions using the Rust identifier by default (snake_case), and the bridge definescodetether_list_models. As written this will usually return[]even when the native function exists. Update the wrapper to call the exported name (or explicitly setjs_namein the Rust bridge).@ -0,0 +1,117 @@import * as vscode from 'vscode';The chat sidebar webview relies on inline
<style>and inline<script>, which forces the CSP to allowstyle-src 'unsafe-inline'. For a VS Code webview this is avoidable: move CSS/JS into bundled files referenced viawebview.asWebviewUri(or apply a nonce to styles if you must inline) and tighten the CSP to remove unsafe-inline.@ -576,0 +923,4 @@* The nonce is stored so the CSP and script tag use the same value without* leaking any additional mutable state into callers.*/private _nonce(): string {_splitPath()accepts path segments like..and_toUri()joins them onto the workspace URI. Since webview messages are untrusted input, a compromised webview could attempt path traversal outside the workspace. Consider rejecting./..segments and validating the resolved URI stays within the workspace folder before callingworkspace.fs.readDirectory.This looks like a local rust-analyzer/cargo build log under
target/and should not be committed to the repository. Please remove it from the PR and ensuretarget/artifacts are ignored so future builds don’t dirty the working tree.Addressed the review feedback in
1db46cd.Updated:
Validation:
pm run build:napi
pm run build
There is still one pre-existing bundler warning around dynamic
equire() in src/nativeBridge.ts, but the build succeeds.
Added and validated the language-aware Document with Codetether right-click command in
531ecc1.Validation performed:
pm run build:ts
usty-refactor-0.6.23.vsix
ustyRefactor.documentWithCodetether
ustyRefactor.documentWithCodetether and calls the language-aware generateSelectionDocumentationWithCodetether path
VS Code CLI does not expose a general command runner for invoking an editor command with an active selection, so this validates the API contribution contract that VS Code uses to render and register the command.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.