codexmate 0.1.7 → 0.1.9
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.
- package/cli/system-prompt-files.js +177 -0
- package/cli.js +27 -0
- package/package.json +1 -1
- package/web-ui/app.js +22 -0
- package/web-ui/modules/app.computed.session.mjs +1 -1
- package/web-ui/modules/app.methods.agents.mjs +5 -12
- package/web-ui/modules/app.methods.index.mjs +2 -0
- package/web-ui/modules/app.methods.session-actions.mjs +161 -11
- package/web-ui/modules/app.methods.session-browser.mjs +26 -1
- package/web-ui/modules/app.methods.system-prompt.mjs +294 -0
- package/web-ui/modules/i18n/locales/en.mjs +24 -0
- package/web-ui/modules/i18n/locales/ja.mjs +24 -0
- package/web-ui/modules/i18n/locales/vi.mjs +24 -0
- package/web-ui/modules/i18n/locales/zh-tw.mjs +24 -0
- package/web-ui/modules/i18n/locales/zh.mjs +24 -0
- package/web-ui/modules/request-token.mjs +9 -0
- package/web-ui/partials/index/panel-prompts.html +96 -1
- package/web-ui/partials/index/panel-sessions.html +30 -2
- package/web-ui/res/web-ui-render.precompiled.js +633 -288
- package/web-ui/session-helpers.mjs +3 -0
- package/web-ui/styles/responsive.css +18 -0
- package/web-ui/styles/sessions-list.css +96 -0
- package/web-ui/styles/sessions-usage.css +20 -1
- package/web-ui/styles/system-prompt.css +23 -0
- package/web-ui/styles.css +1 -0
|
@@ -276,6 +276,9 @@ export async function loadSessions(api, options = {}) {
|
|
|
276
276
|
loadSucceeded = true;
|
|
277
277
|
const rawSessions = Array.isArray(res.sessions) ? res.sessions : [];
|
|
278
278
|
this.sessionsList = rawSessions.filter(s => s && typeof s === 'object');
|
|
279
|
+
if (typeof this.clearSessionBatchSelection === 'function') {
|
|
280
|
+
this.clearSessionBatchSelection();
|
|
281
|
+
}
|
|
279
282
|
for (const session of this.sessionsList) {
|
|
280
283
|
const rawUpdatedAt = typeof session.updatedAt === 'string' ? session.updatedAt : '';
|
|
281
284
|
session.updatedAtLabel = formatSessionTimelineTimestamp(rawUpdatedAt);
|
|
@@ -186,6 +186,24 @@ textarea:focus-visible {
|
|
|
186
186
|
|
|
187
187
|
.mode-cards > .segmented-control {
|
|
188
188
|
flex-direction: row;
|
|
189
|
+
flex-wrap: nowrap;
|
|
190
|
+
max-width: 100%;
|
|
191
|
+
overflow-x: auto;
|
|
192
|
+
overflow-y: hidden;
|
|
193
|
+
scrollbar-width: none;
|
|
194
|
+
-webkit-overflow-scrolling: touch;
|
|
195
|
+
scroll-snap-type: x proximity;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.mode-cards > .segmented-control::-webkit-scrollbar {
|
|
199
|
+
display: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.mode-cards > .segmented-control > .segment {
|
|
203
|
+
flex: 0 0 auto;
|
|
204
|
+
min-width: 0;
|
|
205
|
+
white-space: nowrap;
|
|
206
|
+
scroll-snap-align: start;
|
|
189
207
|
}
|
|
190
208
|
|
|
191
209
|
.prompts-editor-toolbar {
|
|
@@ -687,3 +687,99 @@
|
|
|
687
687
|
0%, 100% { opacity: 1; }
|
|
688
688
|
50% { opacity: 0.6; }
|
|
689
689
|
}
|
|
690
|
+
|
|
691
|
+
/* === 会话批量删除交互 === */
|
|
692
|
+
.session-item.batch-selectable {
|
|
693
|
+
cursor: default;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.session-item.batch-selectable .session-item-main,
|
|
697
|
+
.session-item.batch-selectable .session-item-meta {
|
|
698
|
+
pointer-events: none;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.session-item.batch-selectable .session-item-actions {
|
|
702
|
+
pointer-events: none;
|
|
703
|
+
opacity: 0.45;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.session-item.batch-selected {
|
|
707
|
+
background: var(--color-brand-light);
|
|
708
|
+
box-shadow: inset 3px 0 0 var(--color-brand);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.session-batch-check {
|
|
712
|
+
flex: 0 0 auto;
|
|
713
|
+
display: inline-flex;
|
|
714
|
+
align-items: center;
|
|
715
|
+
justify-content: center;
|
|
716
|
+
width: 22px;
|
|
717
|
+
height: 22px;
|
|
718
|
+
margin-right: 10px;
|
|
719
|
+
position: relative;
|
|
720
|
+
cursor: pointer;
|
|
721
|
+
user-select: none;
|
|
722
|
+
pointer-events: auto;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
.session-batch-check input {
|
|
726
|
+
position: absolute;
|
|
727
|
+
inset: 0;
|
|
728
|
+
opacity: 0;
|
|
729
|
+
margin: 0;
|
|
730
|
+
cursor: pointer;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.session-batch-check-mark {
|
|
734
|
+
display: block;
|
|
735
|
+
width: 18px;
|
|
736
|
+
height: 18px;
|
|
737
|
+
border-radius: 6px;
|
|
738
|
+
border: 1.5px solid var(--color-border-strong);
|
|
739
|
+
background: var(--color-surface-elevated);
|
|
740
|
+
transition: background var(--transition-fast) var(--ease-spring-soft),
|
|
741
|
+
border-color var(--transition-fast) var(--ease-spring-soft);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.session-batch-check input:checked + .session-batch-check-mark {
|
|
745
|
+
background: var(--color-brand);
|
|
746
|
+
border-color: var(--color-brand);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.session-batch-check input:checked + .session-batch-check-mark::after {
|
|
750
|
+
content: '';
|
|
751
|
+
position: absolute;
|
|
752
|
+
left: 6px;
|
|
753
|
+
top: 3px;
|
|
754
|
+
width: 5px;
|
|
755
|
+
height: 9px;
|
|
756
|
+
border: solid #fff;
|
|
757
|
+
border-width: 0 2px 2px 0;
|
|
758
|
+
transform: rotate(45deg);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.session-batch-check input:disabled + .session-batch-check-mark {
|
|
762
|
+
opacity: 0.4;
|
|
763
|
+
cursor: not-allowed;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
.session-item.batch-selectable .session-item-header {
|
|
767
|
+
align-items: center;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
.btn-tool-batch,
|
|
771
|
+
.btn-tool-batch-delete {
|
|
772
|
+
display: inline-flex;
|
|
773
|
+
align-items: center;
|
|
774
|
+
gap: 5px;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.btn-tool-batch svg,
|
|
778
|
+
.btn-tool-batch-delete svg {
|
|
779
|
+
width: 14px;
|
|
780
|
+
height: 14px;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.btn-tool-batch-delete:not(:disabled) {
|
|
784
|
+
color: var(--color-error);
|
|
785
|
+
}
|
|
@@ -342,12 +342,26 @@
|
|
|
342
342
|
|
|
343
343
|
.usage-wave-labels {
|
|
344
344
|
display: flex;
|
|
345
|
-
|
|
345
|
+
flex-wrap: nowrap;
|
|
346
|
+
justify-content: flex-start;
|
|
346
347
|
margin-top: 12px;
|
|
347
348
|
padding: 0 8px;
|
|
349
|
+
overflow-x: auto;
|
|
350
|
+
overflow-y: hidden;
|
|
351
|
+
scrollbar-width: none;
|
|
352
|
+
-webkit-overflow-scrolling: touch;
|
|
353
|
+
scroll-snap-type: x proximity;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.usage-wave-labels::-webkit-scrollbar {
|
|
357
|
+
display: none;
|
|
348
358
|
}
|
|
349
359
|
|
|
350
360
|
.usage-wave-label {
|
|
361
|
+
flex: 0 0 auto;
|
|
362
|
+
min-width: 0;
|
|
363
|
+
white-space: nowrap;
|
|
364
|
+
scroll-snap-align: start;
|
|
351
365
|
font-size: 11px;
|
|
352
366
|
color: var(--color-text-muted);
|
|
353
367
|
cursor: pointer;
|
|
@@ -372,6 +386,11 @@
|
|
|
372
386
|
color: var(--color-brand);
|
|
373
387
|
font-weight: 600;
|
|
374
388
|
background: linear-gradient(135deg, rgba(200, 121, 99, 0.12), rgba(200, 121, 99, 0.06));
|
|
389
|
+
scroll-snap-align: center;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.usage-wave-label:last-child {
|
|
393
|
+
scroll-snap-align: end;
|
|
375
394
|
}
|
|
376
395
|
|
|
377
396
|
/* ---- 日期详情 ---- */
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.sys-prompt-controls {
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 16px;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
margin-bottom: 12px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.sys-prompt-control-group {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.sys-prompt-control-group .form-label {
|
|
15
|
+
font-size: 0.8em;
|
|
16
|
+
opacity: 0.8;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sys-prompt-select {
|
|
20
|
+
min-width: 180px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
package/web-ui/styles.css
CHANGED