quassel 0.1.0
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/ChatInputToolbar.d.ts +32 -0
- package/ChatMessages.d.ts +40 -0
- package/ChatPanel.d.ts +15 -0
- package/ChatSendContext.d.ts +12 -0
- package/DetailModeSwitch.d.ts +18 -0
- package/LICENSE +21 -0
- package/Markdown.d.ts +26 -0
- package/MessageActions.d.ts +17 -0
- package/QuestionCard.d.ts +12 -0
- package/README.md +99 -0
- package/StepPopover.d.ts +12 -0
- package/TimestampSwitch.d.ts +8 -0
- package/WorkingScenes.d.ts +10 -0
- package/announce.d.ts +2 -0
- package/chunk-DOLTANTM.js +84 -0
- package/chunk-DOLTANTM.js.map +7 -0
- package/css/chat.css +927 -0
- package/css/foundation/base.css +24 -0
- package/css/foundation/index.css +3 -0
- package/css/foundation/panel.css +111 -0
- package/css/foundation/tokens.css +68 -0
- package/css/foundation/wash.css +26 -0
- package/css/question.css +149 -0
- package/events.d.ts +88 -0
- package/events.js +11 -0
- package/events.js.map +7 -0
- package/icons.d.ts +15 -0
- package/index.d.ts +16 -0
- package/index.js +1661 -0
- package/index.js.map +7 -0
- package/options.d.ts +42 -0
- package/package.json +53 -0
- package/server/http.d.ts +17 -0
- package/server/index.d.ts +6 -0
- package/server/index.js +478 -0
- package/server/index.js.map +7 -0
- package/server/manager.d.ts +12 -0
- package/server/openai.d.ts +16 -0
- package/server/session.d.ts +27 -0
- package/server/store.d.ts +18 -0
- package/server/types.d.ts +62 -0
- package/texts.d.ts +39 -0
- package/timestamps.d.ts +5 -0
- package/types.d.ts +22 -0
- package/useChat.d.ts +14 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* Optional: App-weite Grundeinstellungen. Bewusst nicht Teil von index.css,
|
|
2
|
+
damit die Bibliothek einem Host nichts Globales aufzwingt. */
|
|
3
|
+
* {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
scrollbar-width: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
*::-webkit-scrollbar {
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
html, body {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
margin: 0;
|
|
18
|
+
padding: 16px;
|
|
19
|
+
background: var(--qsl-app-bg);
|
|
20
|
+
color: var(--qsl-text);
|
|
21
|
+
font-family: var(--qsl-font);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* Das Glas-Panel lebt vom Zusammenspiel mit der Waschung dahinter: durchscheinende
|
|
2
|
+
Flaeche statt opacity, damit die Kinder deckend bleiben. */
|
|
3
|
+
.qsl-panel {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-height: 0;
|
|
7
|
+
border: 1px solid var(--qsl-line);
|
|
8
|
+
border-radius: var(--qsl-radius-panel);
|
|
9
|
+
background: color-mix(in srgb, var(--qsl-panel) 88%, transparent);
|
|
10
|
+
backdrop-filter: blur(18px) saturate(1.2);
|
|
11
|
+
box-shadow: var(--qsl-shadow-bar);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.qsl-panel__head {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
padding: 14px 14px 8px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.qsl-panel__head h1,
|
|
22
|
+
.qsl-panel__head h2 {
|
|
23
|
+
flex: 1;
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-size: 13px;
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
color: var(--qsl-ink);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.qsl-panel__body {
|
|
31
|
+
flex: 1;
|
|
32
|
+
min-height: 0;
|
|
33
|
+
overflow-y: auto;
|
|
34
|
+
padding: 0 8px 12px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.qsl-panel__foot {
|
|
38
|
+
padding: 8px 14px;
|
|
39
|
+
border-top: 1px solid var(--qsl-line-soft);
|
|
40
|
+
font-size: 10px;
|
|
41
|
+
color: var(--qsl-muted);
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.qsl-field {
|
|
48
|
+
padding: 6px 10px;
|
|
49
|
+
border: 1px solid var(--qsl-line);
|
|
50
|
+
border-radius: var(--qsl-radius);
|
|
51
|
+
background: var(--qsl-content);
|
|
52
|
+
color: var(--qsl-ink);
|
|
53
|
+
font: inherit;
|
|
54
|
+
font-size: 12.5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qsl-field:focus {
|
|
58
|
+
outline: none;
|
|
59
|
+
border-color: var(--qsl-accent);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.qsl-ghost {
|
|
63
|
+
display: block;
|
|
64
|
+
width: 100%;
|
|
65
|
+
padding: 7px 9px;
|
|
66
|
+
border: 0;
|
|
67
|
+
border-radius: var(--qsl-radius);
|
|
68
|
+
background: none;
|
|
69
|
+
color: inherit;
|
|
70
|
+
font: inherit;
|
|
71
|
+
text-align: left;
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.qsl-ghost:hover,
|
|
76
|
+
.qsl-ghost.qsl-ghost--active {
|
|
77
|
+
background: var(--qsl-surface);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.qsl-label {
|
|
81
|
+
padding: 12px 6px 4px;
|
|
82
|
+
font-size: 10px;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
letter-spacing: .06em;
|
|
85
|
+
color: var(--qsl-muted);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.qsl-dot {
|
|
89
|
+
flex: 0 0 auto;
|
|
90
|
+
width: 6px;
|
|
91
|
+
height: 6px;
|
|
92
|
+
border-radius: 50%;
|
|
93
|
+
background: var(--qsl-line);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.qsl-dot--live {
|
|
97
|
+
background: var(--qsl-success);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.qsl-dot--working {
|
|
101
|
+
background: var(--qsl-accent);
|
|
102
|
+
animation: qsl-pulse 1.9s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.qsl-pulse {
|
|
106
|
+
animation: qsl-pulse 1.9s cubic-bezier(0.2, 0.6, 0.35, 1) infinite;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes qsl-pulse {
|
|
110
|
+
50% { opacity: .3; }
|
|
111
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--qsl-ink: #223347;
|
|
3
|
+
--qsl-muted: #7692ad;
|
|
4
|
+
--qsl-line: #d1dde9;
|
|
5
|
+
--qsl-line-soft: #e3ecf2;
|
|
6
|
+
--qsl-surface: #ecf2f7;
|
|
7
|
+
--qsl-panel: #f8fcff;
|
|
8
|
+
--qsl-content: #ffffff;
|
|
9
|
+
--qsl-accent: #2a94fa;
|
|
10
|
+
--qsl-danger: #ff004e;
|
|
11
|
+
--qsl-success: #72d500;
|
|
12
|
+
--qsl-app-bg: #f4f6fa;
|
|
13
|
+
--qsl-text: #1d2433;
|
|
14
|
+
--qsl-shadow-bar: 0 2px 10px rgba(34, 51, 71, 0.07);
|
|
15
|
+
--qsl-shadow-pop: 0 10px 30px rgba(118, 146, 173, 0.28);
|
|
16
|
+
--qsl-mono: "Noto Sans Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
17
|
+
--qsl-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
18
|
+
--qsl-radius-panel: 14px;
|
|
19
|
+
--qsl-radius-large: 12px;
|
|
20
|
+
--qsl-radius: 8px;
|
|
21
|
+
--qsl-radius-small: 4px;
|
|
22
|
+
--qsl-wash-1: oklch(0.93 0.055 245 / 0.75);
|
|
23
|
+
--qsl-wash-2: oklch(0.94 0.05 165 / 0.7);
|
|
24
|
+
--qsl-wash-3: oklch(0.93 0.05 305 / 0.6);
|
|
25
|
+
--qsl-wash-4: oklch(0.95 0.045 75 / 0.65);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (prefers-color-scheme: dark) {
|
|
29
|
+
:root:not([data-theme="light"]) {
|
|
30
|
+
--qsl-ink: #dbe6f2;
|
|
31
|
+
--qsl-muted: #8ea6bf;
|
|
32
|
+
--qsl-line: #33465c;
|
|
33
|
+
--qsl-line-soft: #2b3c4f;
|
|
34
|
+
--qsl-surface: #223142;
|
|
35
|
+
--qsl-panel: #1b2938;
|
|
36
|
+
--qsl-content: #16212d;
|
|
37
|
+
--qsl-accent: #58aaff;
|
|
38
|
+
--qsl-danger: #ff4d7d;
|
|
39
|
+
--qsl-app-bg: #131c26;
|
|
40
|
+
--qsl-text: #dbe6f2;
|
|
41
|
+
--qsl-shadow-bar: 0 2px 10px rgba(0, 0, 0, 0.4);
|
|
42
|
+
--qsl-shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.5);
|
|
43
|
+
--qsl-wash-1: oklch(0.5 0.11 250 / 0.4);
|
|
44
|
+
--qsl-wash-2: oklch(0.5 0.1 170 / 0.3);
|
|
45
|
+
--qsl-wash-3: oklch(0.48 0.11 310 / 0.3);
|
|
46
|
+
--qsl-wash-4: oklch(0.55 0.09 75 / 0.24);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:root[data-theme="dark"] {
|
|
51
|
+
--qsl-ink: #dbe6f2;
|
|
52
|
+
--qsl-muted: #8ea6bf;
|
|
53
|
+
--qsl-line: #33465c;
|
|
54
|
+
--qsl-line-soft: #2b3c4f;
|
|
55
|
+
--qsl-surface: #223142;
|
|
56
|
+
--qsl-panel: #1b2938;
|
|
57
|
+
--qsl-content: #16212d;
|
|
58
|
+
--qsl-accent: #58aaff;
|
|
59
|
+
--qsl-danger: #ff4d7d;
|
|
60
|
+
--qsl-app-bg: #131c26;
|
|
61
|
+
--qsl-text: #dbe6f2;
|
|
62
|
+
--qsl-shadow-bar: 0 2px 10px rgba(0, 0, 0, 0.4);
|
|
63
|
+
--qsl-shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.5);
|
|
64
|
+
--qsl-wash-1: oklch(0.5 0.11 250 / 0.4);
|
|
65
|
+
--qsl-wash-2: oklch(0.5 0.1 170 / 0.3);
|
|
66
|
+
--qsl-wash-3: oklch(0.48 0.11 310 / 0.3);
|
|
67
|
+
--qsl-wash-4: oklch(0.55 0.09 75 / 0.24);
|
|
68
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Vier blasse Farbwaschungen, bewusst statisch. inset -25% laesst die Raender nie anschneiden. */
|
|
2
|
+
.qsl-wash {
|
|
3
|
+
position: relative;
|
|
4
|
+
isolation: isolate;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.qsl-wash::before {
|
|
8
|
+
content: "";
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: -25%;
|
|
11
|
+
z-index: -1;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
background:
|
|
14
|
+
radial-gradient(38% 42% at 18% 22%, var(--qsl-wash-1), transparent 72%),
|
|
15
|
+
radial-gradient(34% 38% at 82% 16%, var(--qsl-wash-2), transparent 72%),
|
|
16
|
+
radial-gradient(42% 46% at 74% 82%, var(--qsl-wash-3), transparent 72%),
|
|
17
|
+
radial-gradient(36% 40% at 22% 86%, var(--qsl-wash-4), transparent 72%);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body.qsl-wash::before {
|
|
21
|
+
position: fixed;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.qsl-wash--clip {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
}
|
package/css/question.css
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/* Rückfrage-Karte (QuestionCard). */
|
|
2
|
+
|
|
3
|
+
/* Eigenes Fundament, damit die Karte auch ohne foundation/base.css eines Hosts traegt. */
|
|
4
|
+
.qsl-question,
|
|
5
|
+
.qsl-question * {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.qsl-question {
|
|
10
|
+
display: block;
|
|
11
|
+
padding: 12px 14px;
|
|
12
|
+
border: 1px solid var(--qsl-line);
|
|
13
|
+
border-radius: var(--qsl-radius-large);
|
|
14
|
+
background: var(--qsl-content);
|
|
15
|
+
font-family: var(--qsl-font);
|
|
16
|
+
color: var(--qsl-ink);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.qsl-question__text {
|
|
20
|
+
margin-bottom: 10px;
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.qsl-question__options {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: stretch;
|
|
28
|
+
gap: 6px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.qsl-question__option {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
padding: 7px 12px;
|
|
36
|
+
border: 1px solid var(--qsl-line);
|
|
37
|
+
border-radius: var(--qsl-radius);
|
|
38
|
+
background: none;
|
|
39
|
+
color: var(--qsl-ink);
|
|
40
|
+
font: inherit;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
text-align: left;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
transition: border-color .12s ease, background-color .12s ease;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.qsl-question__option:hover:not(:disabled) {
|
|
48
|
+
border-color: var(--qsl-accent);
|
|
49
|
+
background: var(--qsl-surface);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.qsl-question__option:disabled {
|
|
53
|
+
opacity: 0.5;
|
|
54
|
+
cursor: default;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.qsl-question__option--gewaehlt {
|
|
58
|
+
border-color: var(--qsl-accent);
|
|
59
|
+
background: color-mix(in srgb, var(--qsl-accent) 8%, transparent);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.qsl-question__kasten {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
width: 14px;
|
|
67
|
+
height: 14px;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
border: 1px solid var(--qsl-line);
|
|
70
|
+
border-radius: 4px;
|
|
71
|
+
color: var(--qsl-accent);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.qsl-question__option--gewaehlt .qsl-question__kasten {
|
|
75
|
+
border-color: var(--qsl-accent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.qsl-question__uebernehmen {
|
|
79
|
+
margin-top: 8px;
|
|
80
|
+
padding: 6px 12px;
|
|
81
|
+
border: none;
|
|
82
|
+
border-radius: var(--qsl-radius);
|
|
83
|
+
background: var(--qsl-accent);
|
|
84
|
+
color: #ffffff;
|
|
85
|
+
font: inherit;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.qsl-question__uebernehmen:disabled {
|
|
91
|
+
opacity: 0.4;
|
|
92
|
+
cursor: default;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.qsl-question__frei {
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: 6px;
|
|
98
|
+
margin-top: 10px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Die Feld-Optik steht hier vollstaendig, damit die Karte auch ohne .qsl-field eines Hosts stimmt. */
|
|
102
|
+
.qsl-question__frei-feld {
|
|
103
|
+
flex: 1;
|
|
104
|
+
min-width: 0;
|
|
105
|
+
padding: 6px 10px;
|
|
106
|
+
border: 1px solid var(--qsl-line);
|
|
107
|
+
border-radius: var(--qsl-radius);
|
|
108
|
+
background: var(--qsl-content);
|
|
109
|
+
color: var(--qsl-ink);
|
|
110
|
+
font: inherit;
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.qsl-question__frei-feld:focus {
|
|
115
|
+
outline: none;
|
|
116
|
+
border-color: var(--qsl-accent);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.qsl-question__frei-senden {
|
|
120
|
+
padding: 5px 11px;
|
|
121
|
+
border: 1px solid var(--qsl-line);
|
|
122
|
+
border-radius: var(--qsl-radius);
|
|
123
|
+
background: none;
|
|
124
|
+
color: var(--qsl-ink);
|
|
125
|
+
font: inherit;
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.qsl-question__frei-senden:hover:not(:disabled) {
|
|
131
|
+
border-color: var(--qsl-accent);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.qsl-question__frei-senden:disabled {
|
|
135
|
+
opacity: 0.4;
|
|
136
|
+
cursor: default;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.qsl-question__answered {
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
gap: 6px;
|
|
143
|
+
font-size: 12px;
|
|
144
|
+
color: var(--qsl-muted);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.qsl-question__check {
|
|
148
|
+
color: var(--qsl-success);
|
|
149
|
+
}
|
package/events.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export type Role = "user" | "assistant" | "thinking" | "tool" | "system" | "question";
|
|
2
|
+
export interface ToolInfo {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
arguments: string;
|
|
6
|
+
result?: string;
|
|
7
|
+
isError?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Eine Rückfrage des Assistenten. `answer` gesetzt heißt: beantwortet, die Karte ist nur noch Beleg. */
|
|
10
|
+
export interface Question {
|
|
11
|
+
callId: string;
|
|
12
|
+
options: string[];
|
|
13
|
+
multi?: boolean;
|
|
14
|
+
answer?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface Message {
|
|
17
|
+
key: string;
|
|
18
|
+
role: Role;
|
|
19
|
+
text: string;
|
|
20
|
+
closed?: boolean;
|
|
21
|
+
tool?: ToolInfo;
|
|
22
|
+
question?: Question;
|
|
23
|
+
/** ISO-Zeitpunkt der Nachricht; Anzeige optional (ChatMessages showTimestamps). */
|
|
24
|
+
at?: string;
|
|
25
|
+
/** Farbige Sprechblase statt Fliesstext, z.B. fuer Mehrparteien-Gespraeche. */
|
|
26
|
+
bubble?: {
|
|
27
|
+
color: string;
|
|
28
|
+
side: "start" | "end";
|
|
29
|
+
label?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export type ChatEvent = {
|
|
33
|
+
kind: "reset";
|
|
34
|
+
} | {
|
|
35
|
+
kind: "user";
|
|
36
|
+
text: string;
|
|
37
|
+
at?: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: "text";
|
|
40
|
+
delta: string;
|
|
41
|
+
at?: string;
|
|
42
|
+
} | {
|
|
43
|
+
kind: "thinking";
|
|
44
|
+
delta: string;
|
|
45
|
+
at?: string;
|
|
46
|
+
} | {
|
|
47
|
+
kind: "tool";
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
arguments: string;
|
|
51
|
+
label?: string;
|
|
52
|
+
at?: string;
|
|
53
|
+
} | {
|
|
54
|
+
kind: "tool-result";
|
|
55
|
+
id: string;
|
|
56
|
+
result: string;
|
|
57
|
+
isError?: boolean;
|
|
58
|
+
} | {
|
|
59
|
+
kind: "question";
|
|
60
|
+
callId: string;
|
|
61
|
+
text: string;
|
|
62
|
+
options: string[];
|
|
63
|
+
multi?: boolean;
|
|
64
|
+
at?: string;
|
|
65
|
+
} | {
|
|
66
|
+
kind: "question-answered";
|
|
67
|
+
callId: string;
|
|
68
|
+
answer: string;
|
|
69
|
+
} | {
|
|
70
|
+
kind: "system";
|
|
71
|
+
text: string;
|
|
72
|
+
at?: string;
|
|
73
|
+
} | {
|
|
74
|
+
kind: "status";
|
|
75
|
+
running: boolean;
|
|
76
|
+
} | {
|
|
77
|
+
kind: "turn-done";
|
|
78
|
+
} | {
|
|
79
|
+
kind: "extension";
|
|
80
|
+
pluginId: string;
|
|
81
|
+
type: string;
|
|
82
|
+
payload?: unknown;
|
|
83
|
+
at?: string;
|
|
84
|
+
};
|
|
85
|
+
/** Der Streaming-Kern: Deltas verschmelzen mit dem letzten offenen Block, alles andere schließt ihn. */
|
|
86
|
+
export declare function applyEvent(messages: Message[], event: ChatEvent): Message[];
|
|
87
|
+
export declare function prettyJson(value: string): string;
|
|
88
|
+
export declare function compactToolLine(tool: ToolInfo): string;
|
package/events.js
ADDED
package/events.js.map
ADDED
package/icons.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface IconProps {
|
|
2
|
+
size?: number;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function IconSend(props: IconProps): import("react").JSX.Element;
|
|
6
|
+
export declare function IconStop(props: IconProps): import("react").JSX.Element;
|
|
7
|
+
export declare function IconX(props: IconProps): import("react").JSX.Element;
|
|
8
|
+
export declare function IconChevronDown(props: IconProps): import("react").JSX.Element;
|
|
9
|
+
export declare function IconChevronRight(props: IconProps): import("react").JSX.Element;
|
|
10
|
+
export declare function IconLayers(props: IconProps): import("react").JSX.Element;
|
|
11
|
+
export declare function IconCheck(props: IconProps): import("react").JSX.Element;
|
|
12
|
+
export declare function IconSpark(props: IconProps): import("react").JSX.Element;
|
|
13
|
+
export declare function IconClock(props: IconProps): import("react").JSX.Element;
|
|
14
|
+
export declare function IconTool(props: IconProps): import("react").JSX.Element;
|
|
15
|
+
export {};
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type { Role, ToolInfo, Question, Message, DetailMode, StepState, ChatEvent, ChatAnnouncement } from "./types";
|
|
2
|
+
export { applyEvent, prettyJson, compactToolLine, stepState } from "./types";
|
|
3
|
+
export type { ChatTexts } from "./texts";
|
|
4
|
+
export { defaultTexts } from "./texts";
|
|
5
|
+
export { useChat } from "./useChat";
|
|
6
|
+
export { ChatMessages } from "./ChatMessages";
|
|
7
|
+
export { ChatPanel } from "./ChatPanel";
|
|
8
|
+
export { TimestampSwitch } from "./TimestampSwitch";
|
|
9
|
+
export { ChatInputToolbar } from "./ChatInputToolbar";
|
|
10
|
+
export type { ToolbarAction } from "./ChatInputToolbar";
|
|
11
|
+
export { Markdown, markdownPlainText } from "./Markdown";
|
|
12
|
+
export { announce } from "./announce";
|
|
13
|
+
export type { ChatAppearance, TimestampOptions, CodeBlockOptions, BubbleOptions, MessageAction, MessageActionsOptions, SendShortcut } from "./options";
|
|
14
|
+
export type { LinkClickHandler } from "./Markdown";
|
|
15
|
+
export { DetailModeSwitch, DETAIL_MODES, detailModeLabel } from "./DetailModeSwitch";
|
|
16
|
+
export { IconSend, IconStop, IconX, IconChevronDown, IconChevronRight, IconLayers, IconCheck, IconSpark, IconTool, IconClock, } from "./icons";
|