feat: IME-aware chat input, message copy button, Git path scanning

- Fix IME composition issue: Enter during Chinese/Japanese/Korean input
  method composition no longer prematurely sends messages (assistant.js)
  Uses e.isComposing + keyCode 229 guard on keydown handler
- Add one-click copy button to chat message bubbles (both chat.js and
  assistant.js), with hover-reveal animation and checkmark feedback
- Add 'copy' icon to SVG icon library (Lucide style)
- Add CSS for msg-copy-btn in chat.css and assistant.css
- Implement scan_git_paths Rust command: scans common Git installation
  locations on Windows/macOS/Linux (Program Files, Scoop, Chocolatey,
  GitHub Desktop, VS Code, MSYS2, Homebrew, Xcode CLT, etc.)
- Register scan_git_paths in lib.rs, tauri-api.js, dev-api.js
- Add scan button + results UI in settings.js Git path section
- Add i18n keys: gitScan, gitScanning, gitScanEmpty, gitScanUse
This commit is contained in:
晴天
2026-04-06 00:14:18 +08:00
parent 42aeb8b077
commit 9ff91f74d8
11 changed files with 273 additions and 8 deletions

View File

@@ -283,6 +283,37 @@
.ast-msg-bubble-ai h2 { font-size: 16px; }
.ast-msg-bubble-ai h3 { font-size: 14px; }
/* 消息元信息 + 复制按钮 */
.ast-msg-meta {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
color: var(--text-tertiary);
margin-top: 4px;
padding: 0 4px;
}
.ast-msg-user .ast-msg-meta { justify-content: flex-end; }
.ast-msg-ai .ast-msg-meta { justify-content: flex-start; }
.ast-msg .msg-copy-btn {
display: inline-flex;
align-items: center;
justify-content: center;
background: none;
border: none;
color: var(--text-tertiary);
cursor: pointer;
padding: 2px 4px;
border-radius: 4px;
opacity: 0;
transition: opacity 0.15s, color 0.15s, background 0.15s;
}
.ast-msg:hover .msg-copy-btn,
.ast-msg .msg-copy-btn:focus { opacity: 1; }
.ast-msg .msg-copy-btn:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.ast-msg .msg-copy-btn.copied { opacity: 1; color: var(--success); }
/* 流式光标 */
.ast-cursor {
animation: ast-blink 1s infinite;