mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
feat(input): move physical cursor to visual cursor for IME input (#4652)
* feat(input): add useCursor hook for IME physical cursor tracking * refactor(input): optimize cursor positioning effect * feat(input): move setCursorPosition to render phase for immediate cursor positioning * fix(input): calculate absolute cursor position by walking yoga tree * fix(input): use addLayoutListener instead of useCursor for zero-jitter cursor positioning * perf(input): stable addLayoutListener subscription and skip redundant cursor updates * fix(input): revert lastPos dedup that broke cursorDirty one-shot flag * feat(input): use patch-package to expose Ink internals for IME cursor positioning * fix(input): address review feedback — prefixWidth, remove useBoxMetrics, pin ink version Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> --------- Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
This commit is contained in:
parent
7ee37277de
commit
77458ad21f
7 changed files with 335 additions and 9 deletions
22
patches/ink+7.0.3.patch
Normal file
22
patches/ink+7.0.3.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/node_modules/ink/package.json b/node_modules/ink/package.json
|
||||
--- a/node_modules/ink/package.json
|
||||
+++ b/node_modules/ink/package.json
|
||||
@@ -11,8 +11,16 @@
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
- "types": "./build/index.d.ts",
|
||||
- "default": "./build/index.js"
|
||||
+ ".": {
|
||||
+ "types": "./build/index.d.ts",
|
||||
+ "default": "./build/index.js"
|
||||
+ },
|
||||
+ "./dom": {
|
||||
+ "default": "./build/dom.js"
|
||||
+ },
|
||||
+ "./components/CursorContext": {
|
||||
+ "default": "./build/components/CursorContext.js"
|
||||
+ }
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22"
|
||||
Loading…
Add table
Add a link
Reference in a new issue