feat: persist /rtk set config into profile cordis.patch.yml - #3
Open
xelr233 wants to merge 13 commits into
Open
Conversation
verify/show only read the cached probe state, which stays undefined until the first bash call, so an installed rtk was always reported as "not probed yet" (the verify hint even told users to re-run a command that never probes). Force a fresh probe (cache bypass) in both commands and report the resolved path or NOT FOUND. Also fix the npm test script for Node 24 (node --test test/ fails with MODULE_NOT_FOUND) and add command tests covering verify/show probing.
…EADME, fix mode comment F1: bound state.hookPlan / state.hookExecuted to HOOK_PLAN_MAX (64) entries, evicting the oldest beyond the cap, plus defensive hookPlan cleanup in tools/post-execute so a planned-but-never-executed call leaks nothing. F2: propagate readStream spillPath into bash stdout/stderr objects. F3: reconcile README blockquote with the hook-mode exception. F4: update stale DEFAULT_CONFIG.mode comment to include 'hook'.
…rd-party rtk binary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
让
/rtk set与/rtk reset的配置改动自动持久化到 profile 的cordis.patch.yml(id-targeted override 块),重启 DSH 后保持生效——不再每次重启丢状态。变更
apply(ctx, injected):合并 patch 注入的 config({...DEFAULT_CONFIG, ...injected}),重启后模式等配置直接生效persistConfig():通过ctx.fs读写 patch 文件,行级更新- id: dsh-rtk-optimizer块的config:键(无重复、保留注释与其他条目)mode、enabled、guardWhenRtkMissing、readCompaction、debug(not persisted)测试
node --test test/*.test.js→ 46 pass / 0 fail(注入合并、块内加键、键原地更新无重复、追加新块、降级)