@qnote/q-ai-note 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,17 +3,21 @@
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Personal AI Notebook</title>
6
+ <title>Q Note</title>
7
7
  <link rel="stylesheet" href="/styles.css">
8
8
  </head>
9
9
  <body>
10
10
  <div id="app">
11
11
  <nav class="sidebar">
12
12
  <div class="sidebar-header">
13
- <h1>AI Notebook</h1>
13
+ <div class="brand-mark" aria-hidden="true">
14
+ <span class="brand-ring"></span>
15
+ <span class="brand-tail"></span>
16
+ <span class="brand-dot"></span>
17
+ </div>
18
+ <h1>Q Note</h1>
14
19
  </div>
15
20
  <ul class="nav-list">
16
- <li><a href="#/" data-nav="home">对话</a></li>
17
21
  <li><a href="#/sandboxes" data-nav="sandboxes">沙盘</a></li>
18
22
  <li><a href="#/diaries" data-nav="diaries">日记</a></li>
19
23
  <li><a href="#/changes" data-nav="changes">变化</a></li>
@@ -21,18 +25,7 @@
21
25
  </ul>
22
26
  </nav>
23
27
  <main class="content">
24
- <div id="page-home" class="page">
25
- <h2>对话</h2>
26
- <div class="chat-container">
27
- <div id="chat-messages" class="chat-messages"></div>
28
- <div class="chat-input">
29
- <input type="text" id="chat-input" placeholder="输入消息...">
30
- <button id="send-btn">发送</button>
31
- </div>
32
- </div>
33
- </div>
34
-
35
- <div id="page-sandboxes" class="page hidden">
28
+ <div id="page-sandboxes" class="page">
36
29
  <h2>沙盘</h2>
37
30
  <div class="summary-strip" id="sandboxes-summary"></div>
38
31
  <div class="sandbox-grid" id="sandbox-grid"></div>
@@ -49,7 +42,13 @@
49
42
  <button class="btn btn-secondary btn-sm" id="toggle-sandbox-present-btn" type="button">展示态布局</button>
50
43
  <button class="btn btn-secondary btn-sm" id="toggle-sandbox-fullscreen-btn" type="button">全屏</button>
51
44
  </div>
52
- <div class="insight-box hidden" id="sandbox-insight-output"></div>
45
+ <div class="insight-box hidden" id="sandbox-insight-output" hidden>
46
+ <div class="insight-box-header">
47
+ <strong>智能总结</strong>
48
+ <button class="btn btn-secondary btn-sm" id="close-sandbox-insight-btn" type="button">关闭</button>
49
+ </div>
50
+ <div id="sandbox-insight-content"></div>
51
+ </div>
53
52
  <div class="sandbox-layout" id="sandbox-layout">
54
53
  <div class="sandbox-tree-section">
55
54
  <div class="section-header">
@@ -58,7 +57,14 @@
58
57
  <select id="work-tree-view-mode">
59
58
  <option value="full">完整模式</option>
60
59
  <option value="report">汇报折叠模式</option>
61
- <option value="dense">高密度树模式</option>
60
+ <option value="dense">树模式</option>
61
+ </select>
62
+ <select id="work-item-element-preview-mode">
63
+ <option value="none">能力要素:不显示</option>
64
+ <option value="issue">能力要素:Issue</option>
65
+ <option value="knowledge">能力要素:Knowledge</option>
66
+ <option value="capability">能力要素:Capability</option>
67
+ <option value="all">能力要素:全部</option>
62
68
  </select>
63
69
  <label class="inline-checkbox">
64
70
  <input type="checkbox" id="work-item-show-assignee-toggle">
@@ -108,11 +114,21 @@
108
114
  </div>
109
115
  </div>
110
116
  <div class="summary-strip compact" id="node-entity-summary"></div>
117
+ <div class="drawer-diary-quick-form">
118
+ <div class="sandbox-diary-quick-meta">
119
+ <span id="sandbox-diary-target-label">快速日记:未选中节点</span>
120
+ </div>
121
+ <textarea id="drawer-diary-content" placeholder="记录进展(日记支持 Markdown)"></textarea>
122
+ <div class="sandbox-diary-quick-actions">
123
+ <button class="btn btn-primary btn-sm" id="drawer-diary-save-btn" type="button">记录日记</button>
124
+ </div>
125
+ </div>
111
126
  <div class="entity-filter-tabs" id="entity-filter-tabs">
112
127
  <button class="btn btn-secondary btn-sm active" data-entity-filter="all">全部</button>
113
128
  <button class="btn btn-secondary btn-sm" data-entity-filter="issue">Issue</button>
114
129
  <button class="btn btn-secondary btn-sm" data-entity-filter="knowledge">Knowledge</button>
115
130
  <button class="btn btn-secondary btn-sm" data-entity-filter="capability">Capability</button>
131
+ <button class="btn btn-secondary btn-sm" data-entity-filter="diary">Diary</button>
116
132
  </div>
117
133
 
118
134
  <div class="drawer-create-form hidden" id="drawer-create-form">
@@ -138,7 +154,17 @@
138
154
  </select>
139
155
  </div>
140
156
  <div class="entity-field-group" id="entity-capability-type-group">
141
- <input type="text" id="entity-capability-type-input" placeholder="能力类型(Capability可选)">
157
+ <select id="entity-capability-type-input">
158
+ <option value="">能力类型(Capability可选)</option>
159
+ <option value="workflow">workflow(流程能力)</option>
160
+ <option value="automation">automation(自动化能力)</option>
161
+ <option value="tooling">tooling(工具能力)</option>
162
+ <option value="collaboration">collaboration(协作能力)</option>
163
+ <option value="analysis">analysis(分析能力)</option>
164
+ <option value="delivery">delivery(交付能力)</option>
165
+ <option value="governance">governance(治理能力)</option>
166
+ <option value="other">other(其他)</option>
167
+ </select>
142
168
  </div>
143
169
  <textarea id="entity-content-input" rows="4" placeholder="Markdown 内容(Knowledge/Capability 推荐)"></textarea>
144
170
  <div class="entity-form-hint" id="entity-form-hint"></div>
@@ -157,6 +183,9 @@
157
183
  <h2>日记</h2>
158
184
  <div class="action-strip">
159
185
  <input type="text" id="diary-search" placeholder="搜索日记内容">
186
+ <select id="diary-sandbox-filter">
187
+ <option value="">全部关联沙盘</option>
188
+ </select>
160
189
  <select id="diary-processed-filter">
161
190
  <option value="all">全部处理状态</option>
162
191
  <option value="unprocessed">仅未处理</option>
@@ -164,15 +193,36 @@
164
193
  </select>
165
194
  </div>
166
195
  <div class="diary-form">
167
- <select id="diary-sandbox-select">
168
- <option value="">关联沙盘(可选)</option>
169
- </select>
170
- <textarea id="diary-content" placeholder="记录日记..."></textarea>
196
+ <textarea id="diary-content" placeholder="记录日记(支持 Markdown)..."></textarea>
171
197
  <button class="btn btn-primary" id="save-diary-btn">保存</button>
172
198
  </div>
173
199
  <div class="diary-timeline" id="diary-timeline"></div>
174
200
  </div>
175
201
 
202
+ <dialog id="diary-edit-dialog">
203
+ <div class="diary-edit-shell">
204
+ <div class="diary-edit-header">
205
+ <h3>编辑日记(Markdown)</h3>
206
+ <p>左侧编辑,右侧实时预览。支持列表、标题、粗体、代码与链接。</p>
207
+ </div>
208
+ <div class="diary-edit-body">
209
+ <section class="diary-edit-pane">
210
+ <div class="diary-edit-pane-title">编辑区</div>
211
+ <textarea id="diary-edit-content" rows="12" placeholder="输入 Markdown 内容..."></textarea>
212
+ </section>
213
+ <section class="diary-edit-pane preview">
214
+ <div class="diary-edit-pane-title">预览</div>
215
+ <div id="diary-edit-preview" class="diary-content diary-edit-preview"></div>
216
+ </section>
217
+ </div>
218
+ <div class="dialog-actions diary-edit-actions">
219
+ <span class="diary-edit-shortcut-hint">快捷键:Ctrl/Cmd + Enter 保存</span>
220
+ <button class="btn btn-secondary" id="cancel-edit-diary-btn" type="button">取消</button>
221
+ <button class="btn btn-primary" id="confirm-edit-diary-btn" type="button">保存修改</button>
222
+ </div>
223
+ </div>
224
+ </dialog>
225
+
176
226
  <div id="page-changes" class="page hidden">
177
227
  <h2>变化追踪</h2>
178
228
  <div class="action-strip">
@@ -46,14 +46,55 @@ body {
46
46
  .sidebar-header {
47
47
  padding: 18px 16px;
48
48
  border-bottom: 1px solid var(--border);
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 10px;
49
52
  }
50
53
 
51
54
  .sidebar-header h1 {
52
55
  font-size: 18px;
53
- font-weight: 500;
56
+ font-weight: 600;
57
+ letter-spacing: 0.2px;
54
58
  color: var(--text);
55
59
  }
56
60
 
61
+ .brand-mark {
62
+ position: relative;
63
+ width: 24px;
64
+ height: 24px;
65
+ flex: 0 0 24px;
66
+ }
67
+
68
+ .brand-ring {
69
+ position: absolute;
70
+ inset: 0;
71
+ border-radius: 50%;
72
+ border: 2px solid #3b82f6;
73
+ box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
74
+ }
75
+
76
+ .brand-tail {
77
+ position: absolute;
78
+ right: -1px;
79
+ bottom: 1px;
80
+ width: 11px;
81
+ height: 2px;
82
+ background: #3b82f6;
83
+ border-radius: 999px;
84
+ transform: rotate(38deg);
85
+ transform-origin: right center;
86
+ }
87
+
88
+ .brand-dot {
89
+ position: absolute;
90
+ right: -1px;
91
+ top: 1px;
92
+ width: 5px;
93
+ height: 5px;
94
+ border-radius: 50%;
95
+ background: #8b5cf6;
96
+ }
97
+
57
98
  .nav-list {
58
99
  list-style: none;
59
100
  padding: 12px 0;
@@ -195,6 +236,13 @@ h2 {
195
236
  white-space: pre-wrap;
196
237
  }
197
238
 
239
+ .insight-box-header {
240
+ display: flex;
241
+ align-items: center;
242
+ justify-content: space-between;
243
+ margin-bottom: 8px;
244
+ }
245
+
198
246
  .changes-list {
199
247
  display: flex;
200
248
  flex-direction: column;
@@ -594,6 +642,24 @@ h2 {
594
642
  padding-left: 2px;
595
643
  }
596
644
 
645
+ .dense-lane-drag-handle {
646
+ width: fit-content;
647
+ font-size: 12px;
648
+ color: #7a8ca8;
649
+ border: 1px dashed #d5deed;
650
+ border-radius: 6px;
651
+ padding: 0 6px;
652
+ margin: 0 0 6px 0;
653
+ cursor: grab;
654
+ user-select: none;
655
+ }
656
+
657
+ .dense-lane-drag-handle:hover {
658
+ color: #4b6ea8;
659
+ border-color: #b8cae6;
660
+ background: #f5f9ff;
661
+ }
662
+
597
663
  .dense-lane:last-child {
598
664
  border-right: none;
599
665
  padding-right: 0;
@@ -739,6 +805,101 @@ h2 {
739
805
  pointer-events: auto;
740
806
  }
741
807
 
808
+ .lane-tree-node-row.drag-over-target {
809
+ border-color: #7ba5ec;
810
+ background: #edf4ff;
811
+ }
812
+
813
+ .lane-tree-node-row[data-drop-position="before"] {
814
+ box-shadow: inset 0 2px 0 #5f8fe0;
815
+ }
816
+
817
+ .lane-tree-node-row[data-drop-position="after"] {
818
+ box-shadow: inset 0 -2px 0 #5f8fe0;
819
+ }
820
+
821
+ .lane-tree-node-row[data-drop-position="child"] {
822
+ border-style: dashed;
823
+ }
824
+
825
+ .lane-tree-node-row.is-dragging {
826
+ opacity: 0.45;
827
+ }
828
+
829
+ .dense-lane.lane-drag-over-target {
830
+ background: #f3f8ff;
831
+ border-color: #bfd7ff;
832
+ }
833
+
834
+ .dense-lane.is-lane-dragging {
835
+ opacity: 0.5;
836
+ }
837
+
838
+ .tree-node-preview-wrapper,
839
+ .lane-node-preview-wrapper {
840
+ padding: 2px 8px 6px 8px;
841
+ }
842
+
843
+ .node-entity-preview-strip {
844
+ display: flex;
845
+ flex-wrap: wrap;
846
+ gap: 6px;
847
+ align-items: center;
848
+ margin-top: 2px;
849
+ }
850
+
851
+ .entity-preview-box {
852
+ display: inline-flex;
853
+ align-items: center;
854
+ gap: 4px;
855
+ max-width: 188px;
856
+ border: 1px solid transparent;
857
+ background: #f8fafc;
858
+ color: #334155;
859
+ padding: 2px 6px;
860
+ cursor: pointer;
861
+ font-size: 11px;
862
+ }
863
+
864
+ .entity-preview-box .entity-preview-type {
865
+ font-weight: 600;
866
+ text-transform: capitalize;
867
+ }
868
+
869
+ .entity-preview-box .entity-preview-title {
870
+ max-width: 108px;
871
+ white-space: nowrap;
872
+ overflow: hidden;
873
+ text-overflow: ellipsis;
874
+ }
875
+
876
+ .entity-preview-box.issue {
877
+ border-radius: 4px;
878
+ border-color: #fecaca;
879
+ background: #fff1f2;
880
+ color: #9f1239;
881
+ }
882
+
883
+ .entity-preview-box.knowledge {
884
+ border-radius: 999px;
885
+ border-style: dashed;
886
+ border-color: #a7f3d0;
887
+ background: #f0fdf4;
888
+ color: #065f46;
889
+ }
890
+
891
+ .entity-preview-box.capability {
892
+ border-radius: 2px;
893
+ border-color: #bfdbfe;
894
+ background: #eff6ff;
895
+ color: #1d4ed8;
896
+ }
897
+
898
+ .entity-preview-more {
899
+ font-size: 11px;
900
+ color: #64748b;
901
+ }
902
+
742
903
  /* Leaf Node Block */
743
904
  .tree-leaf-node {
744
905
  position: relative;
@@ -755,10 +916,15 @@ h2 {
755
916
  transition: all 0.2s;
756
917
  display: flex;
757
918
  align-items: center;
919
+ flex-wrap: wrap;
758
920
  gap: 6px;
759
921
  overflow: visible;
760
922
  }
761
923
 
924
+ .tree-leaf-node > .node-entity-preview-strip {
925
+ width: 100%;
926
+ }
927
+
762
928
  .tree-leaf-grid > .tree-leaf-node {
763
929
  width: auto;
764
930
  min-width: 0;
@@ -1140,8 +1306,8 @@ h2 {
1140
1306
 
1141
1307
  .diary-item {
1142
1308
  position: relative;
1143
- padding: 16px 20px;
1144
- margin-bottom: 16px;
1309
+ padding: 12px 16px;
1310
+ margin-bottom: 12px;
1145
1311
  background: var(--bg);
1146
1312
  border-radius: 12px;
1147
1313
  box-shadow: var(--shadow);
@@ -1162,17 +1328,68 @@ h2 {
1162
1328
  .diary-meta {
1163
1329
  font-size: 12px;
1164
1330
  color: var(--text-secondary);
1165
- margin-bottom: 8px;
1331
+ min-height: 24px;
1332
+ display: flex;
1333
+ align-items: center;
1334
+ flex-wrap: wrap;
1335
+ gap: 4px;
1336
+ }
1337
+
1338
+ .diary-open-node-link {
1339
+ border: none;
1340
+ background: transparent;
1341
+ color: #1d4ed8;
1342
+ font-size: 12px;
1343
+ padding: 0;
1344
+ cursor: pointer;
1345
+ text-decoration: underline;
1346
+ }
1347
+
1348
+ .diary-head-row {
1349
+ display: flex;
1350
+ align-items: center;
1351
+ justify-content: space-between;
1352
+ gap: 8px;
1353
+ margin-bottom: 6px;
1166
1354
  }
1167
1355
 
1168
1356
  .diary-content {
1169
- line-height: 1.6;
1357
+ line-height: 1.45;
1358
+ }
1359
+
1360
+ .diary-content p {
1361
+ margin: 0 0 6px;
1362
+ }
1363
+
1364
+ .diary-content h1,
1365
+ .diary-content h2,
1366
+ .diary-content h3,
1367
+ .diary-content h4,
1368
+ .diary-content h5,
1369
+ .diary-content h6 {
1370
+ margin: 0 0 8px;
1371
+ font-size: 14px;
1372
+ line-height: 1.4;
1373
+ }
1374
+
1375
+ .diary-content ul {
1376
+ margin: 0 0 8px 18px;
1377
+ padding: 0;
1378
+ }
1379
+
1380
+ .diary-content code {
1381
+ background: #f2f4f7;
1382
+ border-radius: 4px;
1383
+ padding: 1px 4px;
1384
+ font-size: 12px;
1170
1385
  }
1171
1386
 
1172
1387
  .diary-actions {
1173
1388
  display: flex;
1389
+ flex-wrap: wrap;
1174
1390
  gap: 8px;
1175
- margin-top: 12px;
1391
+ margin-top: 0;
1392
+ flex-shrink: 0;
1176
1393
  }
1177
1394
 
1178
1395
  .diary-actions button {
@@ -1194,6 +1411,150 @@ h2 {
1194
1411
  color: var(--text-secondary);
1195
1412
  }
1196
1413
 
1414
+ .diary-actions .edit {
1415
+ background: #eff6ff;
1416
+ color: #1d4ed8;
1417
+ }
1418
+
1419
+ #diary-edit-dialog {
1420
+ width: min(980px, 95vw);
1421
+ max-width: none;
1422
+ background: #fff;
1423
+ overflow: hidden;
1424
+ }
1425
+
1426
+ #diary-edit-dialog textarea {
1427
+ width: 100%;
1428
+ min-height: 280px;
1429
+ border: 1px solid var(--border);
1430
+ border-radius: 8px;
1431
+ padding: 10px 12px;
1432
+ font-size: 14px;
1433
+ font-family: inherit;
1434
+ resize: vertical;
1435
+ }
1436
+
1437
+ .diary-edit-shell {
1438
+ display: flex;
1439
+ flex-direction: column;
1440
+ }
1441
+
1442
+ .diary-edit-header {
1443
+ padding: 18px 22px 10px;
1444
+ border-bottom: 1px solid #edf0f5;
1445
+ background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
1446
+ }
1447
+
1448
+ .diary-edit-header h3 {
1449
+ margin: 0;
1450
+ font-size: 20px;
1451
+ }
1452
+
1453
+ .diary-edit-header p {
1454
+ margin: 6px 0 0;
1455
+ font-size: 12px;
1456
+ color: #64748b;
1457
+ }
1458
+
1459
+ .diary-edit-body {
1460
+ display: grid;
1461
+ grid-template-columns: 1fr 1fr;
1462
+ gap: 12px;
1463
+ padding: 12px 22px 14px;
1464
+ }
1465
+
1466
+ .diary-edit-pane {
1467
+ border: 1px solid #e7ecf4;
1468
+ border-radius: 10px;
1469
+ background: #fff;
1470
+ min-width: 0;
1471
+ }
1472
+
1473
+ .diary-edit-pane-title {
1474
+ font-size: 12px;
1475
+ font-weight: 600;
1476
+ color: #475569;
1477
+ padding: 8px 10px;
1478
+ border-bottom: 1px solid #edf0f5;
1479
+ background: #f8fafc;
1480
+ border-radius: 10px 10px 0 0;
1481
+ }
1482
+
1483
+ .diary-edit-pane textarea {
1484
+ border: none !important;
1485
+ border-radius: 0 0 10px 10px !important;
1486
+ margin: 0 !important;
1487
+ }
1488
+
1489
+ .diary-edit-pane textarea:focus {
1490
+ outline: none;
1491
+ }
1492
+
1493
+ .diary-edit-preview {
1494
+ min-height: 280px;
1495
+ max-height: 420px;
1496
+ overflow: auto;
1497
+ padding: 10px 12px;
1498
+ }
1499
+
1500
+ .diary-edit-preview.is-empty {
1501
+ color: #94a3b8;
1502
+ font-style: italic;
1503
+ }
1504
+
1505
+ .diary-edit-actions {
1506
+ align-items: center;
1507
+ gap: 10px;
1508
+ }
1509
+
1510
+ .diary-edit-shortcut-hint {
1511
+ margin-right: auto;
1512
+ font-size: 12px;
1513
+ color: #64748b;
1514
+ }
1515
+
1516
+ @media (max-width: 960px) {
1517
+ .diary-edit-body {
1518
+ grid-template-columns: 1fr;
1519
+ }
1520
+
1521
+ #diary-edit-dialog textarea,
1522
+ .diary-edit-preview {
1523
+ min-height: 180px;
1524
+ }
1525
+ }
1526
+
1527
+ .drawer-diary-quick-form {
1528
+ border: 1px solid #e5e7eb;
1529
+ border-radius: 10px;
1530
+ background: #fff;
1531
+ padding: 10px;
1532
+ margin: 8px 0 10px;
1533
+ }
1534
+
1535
+ .sandbox-diary-quick-meta {
1536
+ font-size: 12px;
1537
+ color: #64748b;
1538
+ margin-bottom: 6px;
1539
+ }
1540
+
1541
+ #drawer-diary-content {
1542
+ width: 100%;
1543
+ min-height: 66px;
1544
+ border: 1px solid #d8e0ed;
1545
+ border-radius: 8px;
1546
+ padding: 8px 10px;
1547
+ font-size: 13px;
1548
+ resize: vertical;
1549
+ }
1550
+
1551
+ .sandbox-diary-quick-actions {
1552
+ margin-top: 8px;
1553
+ display: flex;
1554
+ gap: 8px;
1555
+ justify-content: flex-end;
1556
+ }
1557
+
1197
1558
  /* Settings */
1198
1559
  .settings-form {
1199
1560
  background: var(--bg);