Repository navigation
refactor: rename use to focus and add device persistence - #35
Merged
Merged
Conversation
Rename the database selection system from "context" to "focus" to avoid confusion with LLM context, and replace the vague "use" command with "focus" which better conveys setting the current analysis target. - pt-snap use -> pt-snap focus (with new --device/-d option) - context.json -> focus.json, current_db_path -> db_path - Add device_id persistence alongside db_path - Query auto-uses focused device when --device is not specified - Backward compat: old current_db_path key still readable - Update all docs, tests, and completion functions Fixes #32
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.
📝 Description
将
pt-snap use重命名为pt-snap focus,同时将底层的"上下文"概念从context改为focus,避免与 LLM 上下文混淆。新增device_id持久化能力,使得后续查询无需重复指定--device。核心改动:
pt-snap use→pt-snap focus(新增--device/-d选项)context.json→focus.json,current_db_path→db_pathfocus.json新增device_id字段,支持pt-snap focus --device N独立更新设备pt-snap query自动使用 focus 中的 device(优先级:显式--device> focused device > 首个发现)current_db_pathkey 可被透明读取🔗 Related Issue
Fixes #32
🧪 Testing
✅ Checklist
📋 Additional Notes
新增用法