Repository navigation
feat(settings): expose runtime memory capacity limits - #514
Merged
Merged
Conversation
12 of 28 tasks
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.
摘要 / Summary
运行时记忆的容量已支持配置,但插件页面没有编辑入口。新增用户画像和工作记忆的容量输入,按字节填写并点击应用,支持放弃修改、范围校验和保存失败重试;默认 4 KiB / 10 KiB 保持不变。
Expose the existing user-profile and working-memory byte limits on Runtime Memory settings, with staged Apply/Discard, integer-range validation and retryable failures. Preserve defaults, exact configured byte values and the separate maintenance-token budget.
关联 Issue 或背景 / Related Issue or Context
Closes #505
涉及区域 / Affected Areas
PR 类型 / PR Type
最新代码确认 / Latest Codebase Confirmation
main分支开发,或在提交前已 rebase 或合并最新main。 / I developed from the latestmain, or rebased or merged the latestmainbefore submitting.同步命令 / Sync command:
git fetch origin main; branch created independently fromfa4950616f8c97ce6b4b8285eb89b83cf996d94f(latest main at submission).AI 编码披露 / AI Coding Disclosure
使用的 AI 模型 / AI model used:
GPT-6
使用的编码 Agent 工具 / Coding Agent tool used:
Codex
仓库规范检查 / Repository Rules
@deepseek-ai/*NPM 契约。 / I did not modify DSH source or point tsconfig at a DSH source checkout, and used only published@deepseek-ai/*NPM contracts.src/host/protocol.ts为准,没有在两侧重复定义 wire DTO。 / The Client and Host boundary still uses browser-safesrc/host/protocol.tsas the source for wire DTOs.lib/文件。 / I did not commit tokens, credentials, private memory, unredacted logs, or generatedlib/files.兼容性与数据安全 / Compatibility and Data Safety
复用已有
runtimeMemory.userLimitBytes/memoryLimitBytes配置,接受 1–1048576 的整数字节数。仅写入变更的容量并保留维护预算及未配置项的默认继承。保持原有实时生效语义,不修改持久化、权限、Provider 或模型预算。共享容量常量随浏览器产物打包,边界测试只允许这两个常量,不引入 Source 实现。Uses the existing configuration and live runtime replacement. No storage migration, authority or Provider change. Lowering below usage does not delete entries: the synthetic fixture retained all eight entries and an identical memories.json hash after increasing and lowering limits. Only the two public Runtime capacity constants may cross the checked client import boundary, and the build bundles them so DSH needs no additional browser module factory.
本地验证 / Local Validation
执行的命令 / Commands run:
结果摘要 / Result summary:
All verification phases passed: documentation, typechecks, deterministic build, plugin builds and suites, root tests (2257 passed / 7 conditional skips), Headless activation, package/public-entry checks and release-intent coverage. After adjusting the explicit constant import boundary, reran the root suite, Headless and package checks; reran docs after evidence. The settings suite has 67 passing tests, including 12 new cases for save/discard, busy controls, bounds, exact bytes, preserving inherited/default values, failure/retry, read-only/loading and English copy. Real DSH 0.2.1-rc.2 checks confirm saved values, live capacities, reload persistence, narrow layout and data retention.
用户可见变更证据 / Local Feature Evidence
证据 / Evidence:
中文验收记录 · English evidence. Reproduce with
node scripts/serve-e2e.mjs --docs-demo --without-mnemon-cli; all data is synthetic and no model request is needed.