Repository navigation
feat(draft): run an action on the draft before it is committed - #39
Open
neozheng-dev wants to merge 5 commits into
Open
neozheng-dev wants to merge 5 commits into
neozheng-dev wants to merge 5 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
6 of 7 tasks
Contributor
|
感谢 @neozheng-dev,这个方向很实用。我们的意见: 按键触发可以接受,停顿自动触发我们不打算要。 AIME 的隐私约定是:只有用户主动执行动作时,那段文字才交给模型。按回车或空格执行还算主动操作;停止打字一段时间就自动发出去,越过了这条线,即使默认关闭、需要用户开启也一样。你在 PR 里也提过可以去掉,麻烦按这个方向改:
改好后我们再看。 |
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.
Problem and resulting behavior / 问题与改后行为
With 输入图层 on, people who translate or polish nearly everything they write still have to trigger the action by hand each time, with ⌃⌥P and a digit, or with a shortcut from #37.
开着输入图层、几乎每段话都要翻译或润色的人,每次仍要手动触发动作。
This PR adds 上屏前执行动作 under 设置 › AI 助手 › 输入图层. It is off by default (无) and shown only when AI actions are on. With translate, polish or a custom action chosen:
↩ 翻译 Esc 上屏.Privacy / 隐私. This is the first path where text reaches the model without a key press for that action: with a delay configured, stopping typing is enough. It is opt-in, the settings text says so, and
docs/privacy.mdis updated in this PR. Consent for a remote endpoint (aiRemoteAllowed) still applies. If you would rather not have the delay trigger it at all, I can limit this to the key only.Verification / 验证
swift test --package-path Packages/AIMEKit: all suites pass, including the newDraftAutoActionTests(off unless chosen and both features on, deleted custom action, Return/Space trigger, Space after Latin text, Space as commit key, decoding older and unknown values).xcodebuild -project AIME.xcodeproj -scheme AIME -configuration Debug build(ad-hoc signing): BUILD SUCCEEDED.swiftlint lint: the set of errors is the same as onmain.Screenshots / 截图
Dark / 暗色: 执行动作的键 set to Space, so 原文上屏的键 reads 回车或 Esc.
Light / 亮色
Narrowest window (900 pt), light / 最窄窗口(900pt),亮色. This build also contains #40, which adds the 写作记录 section shown below 输入图层.
Checklist / 检查清单
docs/privacy.mdexists in Chinese only.startActionare unchanged and still gate every request.🤖 Generated with Claude Code