feat(hub-ai): paste screenshots in chat and include position TP/SL in coach context

Let users paste images into AI chat with removable pending attachments, and feed exchange/monitor stop-loss and take-profit into trading coach snapshots so replies reflect actual protection on open positions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-14 01:53:24 +08:00
parent 42c06c0f38
commit 28a23008f3
5 changed files with 389 additions and 45 deletions
+2 -2
View File
@@ -561,13 +561,13 @@
<div id="ai-chat-messages" class="ai-panel-scroll ai-chat-messages" aria-live="polite"></div>
<form id="ai-chat-form" class="ai-chat-form">
<div class="ai-chat-compose">
<textarea id="ai-chat-input" rows="2" placeholder="聊聊行情、心态、纪律、执行…" autocomplete="off"></textarea>
<textarea id="ai-chat-input" rows="2" placeholder="聊聊行情、心态、纪律、执行…;可直接 Ctrl+V 粘贴截图" autocomplete="off"></textarea>
<div id="ai-chat-pending" class="ai-chat-pending-list" aria-live="polite"></div>
<div class="ai-chat-compose-actions">
<label class="ai-chat-upload-btn" title="上传图片或 txt/md/json 文档">
<input type="file" id="ai-chat-files" accept="image/*,.txt,.md,.markdown,.json" multiple hidden />
附件
</label>
<span id="ai-chat-files-label" class="ai-chat-files-label"></span>
<button type="submit" id="btn-ai-chat-send" class="primary">发送</button>
</div>
</div>