Add key-level auto trade, AI analysis, and trading UX improvements.

Key monitors use 5m close triggers with WeChat alerts and box/convergence auto orders; add pending-order worker, structured WeChat notify, AI settings/messages, session clock, CTP margin sizing, and dual-layer position limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-28 10:36:56 +08:00
parent 0109b59f27
commit 840e88daad
33 changed files with 2514 additions and 143 deletions
+12
View File
@@ -0,0 +1,12 @@
.ai-page .card-body{display:flex;flex-direction:column;gap:0;min-height:0}
.ai-usage{margin-bottom:.85rem;font-size:.84rem;color:var(--text-muted)}
.ai-usage summary{cursor:pointer;color:var(--accent);font-weight:600;margin-bottom:.35rem}
.ai-usage-body ul{margin:.25rem 0 0 1.1rem;padding:0;line-height:1.55}
.ai-usage-body a{color:var(--accent)}
.ai-section-label{font-size:.9rem;margin:0 0 .65rem;color:var(--text-title);font-weight:600}
.ai-msg-list{max-height:min(70vh,720px);overflow:auto;padding-right:.25rem}
.ai-msg{border:1px solid var(--border);border-radius:10px;padding:.85rem 1rem;margin-bottom:.75rem;background:rgba(255,255,255,.02)}
.ai-msg-head{display:flex;justify-content:space-between;gap:.5rem;font-size:.75rem;color:var(--text-muted);margin-bottom:.35rem}
.ai-msg-kind{text-transform:uppercase;letter-spacing:.04em;color:var(--accent)}
.ai-msg-title{font-size:.95rem;margin:0 0 .5rem;color:var(--text-title)}
.ai-msg-body{margin:0;white-space:pre-wrap;font-family:inherit;font-size:.84rem;line-height:1.55;color:var(--text-main)}
+13
View File
@@ -0,0 +1,13 @@
.key-rules{margin-bottom:.75rem;font-size:.82rem;color:var(--text-muted)}
.key-rules summary{cursor:pointer;color:var(--accent);font-weight:600;margin-bottom:.35rem}
.key-rules-body{padding:.35rem 0 .15rem}
.key-rules-body ul{margin:.25rem 0 .5rem 1.1rem;padding:0}
.key-rules-body li{margin:.15rem 0}
.key-check{display:inline-flex;align-items:center;gap:.35rem;font-size:.82rem;flex:1;min-width:0;margin:0}
.key-check-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.line-key-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:nowrap}
.line-key-actions.is-hidden{display:none!important}
.line-key-actions .key-submit-btn{flex-shrink:0;min-width:5.5rem;padding:.55rem 1.1rem}
.line-key-actions.key-actions-zone{justify-content:flex-end}
.line-key-actions.key-actions-zone .key-check{display:none}
#key-trade-mode-wrap.is-hidden,#key-rr-wrap.is-hidden{display:none!important}
+6 -1
View File
@@ -22,6 +22,8 @@
.trade-top-bar-main{display:flex;flex-wrap:wrap;gap:.5rem .65rem;align-items:center;flex:1;min-width:0}
.trade-top-bar-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.trade-top-hint{font-size:.72rem;white-space:nowrap}
.trade-session-clock{font-size:.78rem;line-height:1.45}
.session-clock-detail strong{color:var(--accent);font-weight:600}
.btn-ctp-sm{padding:.4rem .9rem;font-size:.8rem;width:auto;white-space:nowrap}
.trade-card{margin-bottom:0;height:100%;display:flex;flex-direction:column}
.trade-card h2{margin-bottom:.35rem;flex-shrink:0}
@@ -85,7 +87,10 @@
.pos-main-badge{font-size:.68rem;vertical-align:middle}
.pos-change-up{color:var(--profit)}
.rec-change-down{color:var(--loss)}
#recommend .trade-table-wrap{max-height:min(70vh,520px)}
#recommend .trade-table-wrap{max-height:none;overflow:visible}
#recommend.card{height:auto}
#recommend .card-body{display:flex;flex-direction:column}
#recommend .trade-table-wrap{flex:0 0 auto}
#positions .card-body.card-scroll{flex:1;max-height:none;overflow-y:auto}
.pos-pending-orders{margin-top:.55rem;padding-top:.55rem;border-top:1px dashed var(--table-border)}
.pos-pending-orders .pending-title{font-size:.68rem;color:var(--text-muted);margin-bottom:.35rem}