@agent-link/server 0.1.162 → 0.1.164
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/package.json +1 -1
- package/web/app.js +229 -7
- package/web/css/ask-question.css +321 -0
- package/web/css/base.css +245 -0
- package/web/css/chat.css +173 -0
- package/web/css/file-browser.css +501 -0
- package/web/css/input.css +594 -0
- package/web/css/loop.css +668 -0
- package/web/css/markdown.css +169 -0
- package/web/css/responsive.css +314 -0
- package/web/css/sidebar.css +603 -0
- package/web/css/team.css +1277 -0
- package/web/css/tools.css +306 -0
- package/web/index.html +11 -1
- package/web/locales/en.json +18 -1
- package/web/locales/zh.json +18 -1
- package/web/modules/connection.js +25 -0
- package/web/modules/filePreview.js +10 -0
- package/web/style.css +0 -5012
package/web/css/base.css
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Keyboard focus outlines (visible only for keyboard navigation) */
|
|
10
|
+
:focus-visible {
|
|
11
|
+
outline: 2px solid var(--accent);
|
|
12
|
+
outline-offset: 2px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:focus:not(:focus-visible) {
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--bg-primary: #1e1e1e;
|
|
21
|
+
--bg-secondary: #252525;
|
|
22
|
+
--bg-tertiary: #2f2f2f;
|
|
23
|
+
--text-primary: #d4d4d4;
|
|
24
|
+
--text-secondary: #858585;
|
|
25
|
+
--accent: #6b9fce;
|
|
26
|
+
--accent-hover: #5a8bba;
|
|
27
|
+
--success: #4ead6a;
|
|
28
|
+
--warning: #d4a24c;
|
|
29
|
+
--error: #d45454;
|
|
30
|
+
--border: #353535;
|
|
31
|
+
--code-bg: #1a1a1a;
|
|
32
|
+
--code-header-bg: #222222;
|
|
33
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ── Light theme ── */
|
|
37
|
+
[data-theme="light"] {
|
|
38
|
+
--bg-primary: #fefcf8;
|
|
39
|
+
--bg-secondary: #f5f3ef;
|
|
40
|
+
--bg-tertiary: #e8e6e1;
|
|
41
|
+
--text-primary: #1a1a1a;
|
|
42
|
+
--text-secondary: #4b5563;
|
|
43
|
+
--accent: #2563eb;
|
|
44
|
+
--accent-hover: #1d4ed8;
|
|
45
|
+
--success: #16a34a;
|
|
46
|
+
--warning: #d97706;
|
|
47
|
+
--error: #dc2626;
|
|
48
|
+
--border: #d1d5db;
|
|
49
|
+
--code-bg: #f1f3f5;
|
|
50
|
+
--code-header-bg: #e9ecef;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
html {
|
|
54
|
+
height: 100%;
|
|
55
|
+
height: 100dvh;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body {
|
|
59
|
+
background-color: var(--bg-primary);
|
|
60
|
+
color: var(--text-primary);
|
|
61
|
+
height: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#app {
|
|
65
|
+
height: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* ── Layout ── */
|
|
69
|
+
.layout {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
height: 100%;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.top-bar {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
padding: 0.5rem 1rem;
|
|
80
|
+
background: var(--bg-secondary);
|
|
81
|
+
border-bottom: 1px solid var(--border);
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.top-bar-left {
|
|
86
|
+
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 0.5rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.sidebar-toggle {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
width: 30px;
|
|
96
|
+
height: 30px;
|
|
97
|
+
background: none;
|
|
98
|
+
border: none;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
color: var(--text-secondary);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
transition: color 0.15s, background 0.15s;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.sidebar-toggle:hover {
|
|
106
|
+
color: var(--text-primary);
|
|
107
|
+
background: var(--bg-tertiary);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.top-bar h1 {
|
|
111
|
+
font-size: 1.1rem;
|
|
112
|
+
font-weight: 700;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.top-bar-info {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
gap: 0.75rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.agent-label {
|
|
122
|
+
color: var(--text-secondary);
|
|
123
|
+
font-size: 0.85rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.latency {
|
|
127
|
+
font-size: 0.75rem;
|
|
128
|
+
font-variant-numeric: tabular-nums;
|
|
129
|
+
opacity: 0.7;
|
|
130
|
+
}
|
|
131
|
+
.latency.good { color: var(--success); }
|
|
132
|
+
.latency.ok { color: var(--warning); }
|
|
133
|
+
.latency.bad { color: var(--error); }
|
|
134
|
+
|
|
135
|
+
.theme-toggle {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
width: 32px;
|
|
140
|
+
height: 32px;
|
|
141
|
+
flex-shrink: 0;
|
|
142
|
+
background: none;
|
|
143
|
+
border: 1px solid var(--border);
|
|
144
|
+
border-radius: 8px;
|
|
145
|
+
color: var(--text-secondary);
|
|
146
|
+
cursor: pointer;
|
|
147
|
+
transition: color 0.15s, background 0.15s, border-color 0.15s;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.theme-toggle:hover {
|
|
151
|
+
color: var(--text-primary);
|
|
152
|
+
background: var(--bg-tertiary);
|
|
153
|
+
border-color: var(--text-secondary);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* ── Center card (no session / waiting) ── */
|
|
157
|
+
.center-card {
|
|
158
|
+
flex: 1;
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
padding: 2rem;
|
|
163
|
+
min-height: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.status-card {
|
|
167
|
+
background: var(--bg-secondary);
|
|
168
|
+
border: 1px solid var(--border);
|
|
169
|
+
border-radius: 12px;
|
|
170
|
+
padding: 1.5rem 2rem;
|
|
171
|
+
min-width: 320px;
|
|
172
|
+
text-align: center;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.status-card .status {
|
|
176
|
+
font-size: 1.1rem;
|
|
177
|
+
margin-bottom: 0.75rem;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.status-card .info {
|
|
181
|
+
margin-bottom: 0.5rem;
|
|
182
|
+
font-size: 0.95rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.status-card .label {
|
|
186
|
+
color: var(--text-secondary);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* ── Badges ── */
|
|
190
|
+
.muted {
|
|
191
|
+
color: var(--text-secondary);
|
|
192
|
+
font-size: 0.85rem;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.badge {
|
|
196
|
+
padding: 2px 8px;
|
|
197
|
+
border-radius: 4px;
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
font-size: 0.9rem;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.badge.connected {
|
|
203
|
+
color: var(--success);
|
|
204
|
+
background: rgba(78, 173, 106, 0.1);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.badge.disconnected {
|
|
208
|
+
color: var(--error);
|
|
209
|
+
background: rgba(212, 84, 84, 0.1);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.badge.connecting\.\.\. {
|
|
213
|
+
color: var(--warning);
|
|
214
|
+
background: rgba(212, 162, 76, 0.1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.badge.reconnecting\.\.\. {
|
|
218
|
+
color: var(--warning);
|
|
219
|
+
background: rgba(212, 162, 76, 0.1);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.badge.waiting {
|
|
223
|
+
color: var(--warning);
|
|
224
|
+
background: rgba(212, 162, 76, 0.1);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.badge.error,
|
|
228
|
+
.badge.no\ session {
|
|
229
|
+
color: var(--error);
|
|
230
|
+
background: rgba(212, 84, 84, 0.1);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.error-msg {
|
|
234
|
+
color: var(--error);
|
|
235
|
+
font-size: 0.85rem;
|
|
236
|
+
margin-top: 0.75rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ── Main body (sidebar + chat) ── */
|
|
240
|
+
.main-body {
|
|
241
|
+
flex: 1;
|
|
242
|
+
display: flex;
|
|
243
|
+
min-height: 0;
|
|
244
|
+
}
|
|
245
|
+
|
package/web/css/chat.css
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/* ── Chat area (message list + input) ── */
|
|
2
|
+
.chat-area {
|
|
3
|
+
flex: 1;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* ── Message list ── */
|
|
10
|
+
.message-list {
|
|
11
|
+
flex: 1 1 auto;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
min-height: 0;
|
|
14
|
+
overscroll-behavior: contain;
|
|
15
|
+
padding: 1.5rem 1.5rem 1rem;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: 0.25rem;
|
|
19
|
+
min-height: 0;
|
|
20
|
+
overscroll-behavior: contain;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.message-list-inner {
|
|
24
|
+
max-width: 768px;
|
|
25
|
+
width: 100%;
|
|
26
|
+
margin: 0 auto;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: 0.25rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.empty-state {
|
|
33
|
+
flex: 1;
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: 0.5rem;
|
|
39
|
+
color: var(--text-secondary);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.empty-state-icon {
|
|
43
|
+
font-size: 2.5rem;
|
|
44
|
+
opacity: 0.5;
|
|
45
|
+
margin-bottom: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.empty-state strong {
|
|
49
|
+
color: var(--text-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ── Messages ── */
|
|
53
|
+
.message {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.message-user {
|
|
59
|
+
margin-top: 1.25rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.message-role-label {
|
|
63
|
+
font-size: 0.75rem;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
text-transform: uppercase;
|
|
66
|
+
letter-spacing: 0.03em;
|
|
67
|
+
margin-bottom: 0.3rem;
|
|
68
|
+
padding-left: 0.1rem;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.message-role-label.user-label {
|
|
72
|
+
color: var(--text-secondary);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.message-role-label.assistant-label {
|
|
76
|
+
color: var(--accent);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.message-bubble {
|
|
80
|
+
padding: 0.6rem 0.9rem;
|
|
81
|
+
border-radius: 10px;
|
|
82
|
+
font-size: 0.94rem;
|
|
83
|
+
line-height: 1.6;
|
|
84
|
+
word-wrap: break-word;
|
|
85
|
+
position: relative;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.user-bubble {
|
|
89
|
+
background: var(--bg-tertiary);
|
|
90
|
+
color: var(--text-primary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ── Queue bar (pending messages above input) ── */
|
|
94
|
+
.queue-bar {
|
|
95
|
+
max-width: 768px;
|
|
96
|
+
margin: 0 auto 6px;
|
|
97
|
+
display: flex;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
gap: 3px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.queue-item {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: 6px;
|
|
106
|
+
background: var(--bg-secondary);
|
|
107
|
+
border: 1px dashed var(--border);
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
padding: 4px 8px;
|
|
110
|
+
font-size: 0.8rem;
|
|
111
|
+
line-height: 1.3;
|
|
112
|
+
color: var(--text-secondary);
|
|
113
|
+
opacity: 0.85;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.queue-item-num {
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
font-weight: 600;
|
|
119
|
+
color: var(--text-secondary);
|
|
120
|
+
font-size: 0.7rem;
|
|
121
|
+
opacity: 0.6;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.queue-item-text {
|
|
125
|
+
flex: 1;
|
|
126
|
+
min-width: 0;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
text-overflow: ellipsis;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.queue-item-attach {
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
136
|
+
gap: 2px;
|
|
137
|
+
font-size: 0.7rem;
|
|
138
|
+
opacity: 0.6;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.queue-item-remove {
|
|
142
|
+
flex-shrink: 0;
|
|
143
|
+
background: none;
|
|
144
|
+
border: none;
|
|
145
|
+
color: var(--text-secondary);
|
|
146
|
+
font-size: 1rem;
|
|
147
|
+
line-height: 1;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
padding: 0 2px;
|
|
150
|
+
opacity: 0.5;
|
|
151
|
+
transition: color 0.15s, opacity 0.15s;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.queue-item-remove:hover {
|
|
155
|
+
opacity: 1;
|
|
156
|
+
color: var(--error);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.usage-bar {
|
|
160
|
+
max-width: 768px;
|
|
161
|
+
margin: 0 auto 6px;
|
|
162
|
+
padding: 4px 10px;
|
|
163
|
+
font-size: 0.75rem;
|
|
164
|
+
color: var(--text-secondary);
|
|
165
|
+
text-align: center;
|
|
166
|
+
opacity: 0.7;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.assistant-bubble {
|
|
170
|
+
background: transparent;
|
|
171
|
+
padding: 0.2rem 0;
|
|
172
|
+
}
|
|
173
|
+
|