quassel 0.1.1 → 0.2.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.
Files changed (59) hide show
  1. package/ChatInputToolbar.d.ts +35 -6
  2. package/ChatMessages.d.ts +19 -15
  3. package/ChatPanel.d.ts +4 -2
  4. package/ChatSendContext.d.ts +7 -12
  5. package/DetailModeSwitch.d.ts +1 -1
  6. package/Markdown.d.ts +4 -11
  7. package/MessageActions.d.ts +1 -10
  8. package/PendingActionCard.d.ts +13 -0
  9. package/QuasselProvider.d.ts +76 -0
  10. package/README.md +39 -38
  11. package/StepPopover.d.ts +1 -1
  12. package/TimestampSwitch.d.ts +2 -2
  13. package/WorkingScenes.d.ts +3 -1
  14. package/attachments.d.ts +24 -0
  15. package/chat-attachments.d.ts +6 -0
  16. package/chat-scroll.d.ts +12 -0
  17. package/chat.css +2051 -0
  18. package/chunk-IGCFQJZB.js +183 -0
  19. package/chunk-IGCFQJZB.js.map +7 -0
  20. package/events.d.ts +74 -17
  21. package/events.js +11 -1
  22. package/index.d.ts +17 -10
  23. package/index.js +1615 -988
  24. package/index.js.map +4 -4
  25. package/options.d.ts +1 -1
  26. package/package.json +12 -10
  27. package/texts.d.ts +38 -11
  28. package/timestamps.d.ts +6 -4
  29. package/types.d.ts +6 -6
  30. package/ui/button.d.ts +8 -0
  31. package/ui/card.d.ts +5 -0
  32. package/ui/cn.d.ts +2 -0
  33. package/ui/popover.d.ts +4 -0
  34. package/ui/spinner.d.ts +2 -0
  35. package/ui/stop-button.d.ts +10 -0
  36. package/ui/toggle.d.ts +8 -0
  37. package/ui/useFileInput.d.ts +20 -0
  38. package/useChatAction.d.ts +6 -0
  39. package/QuestionCard.d.ts +0 -12
  40. package/chunk-DOLTANTM.js +0 -84
  41. package/chunk-DOLTANTM.js.map +0 -7
  42. package/css/chat.css +0 -927
  43. package/css/foundation/base.css +0 -24
  44. package/css/foundation/index.css +0 -3
  45. package/css/foundation/panel.css +0 -111
  46. package/css/foundation/tokens.css +0 -68
  47. package/css/foundation/wash.css +0 -26
  48. package/css/question.css +0 -149
  49. package/icons.d.ts +0 -15
  50. package/server/http.d.ts +0 -17
  51. package/server/index.d.ts +0 -6
  52. package/server/index.js +0 -478
  53. package/server/index.js.map +0 -7
  54. package/server/manager.d.ts +0 -12
  55. package/server/openai.d.ts +0 -16
  56. package/server/session.d.ts +0 -27
  57. package/server/store.d.ts +0 -18
  58. package/server/types.d.ts +0 -62
  59. package/useChat.d.ts +0 -14
@@ -1,24 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- @import "./tokens.css";
2
- @import "./wash.css";
3
- @import "./panel.css";
@@ -1,111 +0,0 @@
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
- }
@@ -1,68 +0,0 @@
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
- }
@@ -1,26 +0,0 @@
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 DELETED
@@ -1,149 +0,0 @@
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/icons.d.ts DELETED
@@ -1,15 +0,0 @@
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/server/http.d.ts DELETED
@@ -1,17 +0,0 @@
1
- import { IncomingMessage, ServerResponse } from "node:http";
2
- import { ChatSessionProvider } from "./types";
3
- export interface ChatHandlerOptions {
4
- manager: ChatSessionProvider;
5
- prefix?: string;
6
- cors?: boolean;
7
- }
8
- /**
9
- * Framework-freier HTTP-Adapter. Routen unter dem Prefix (default /chat):
10
- * GET /:id/stream SSE - erst Verlauf, dann live, mit Keepalive-Pings
11
- * POST /:id/send { text } - startet einen Lauf oder funkt dazwischen
12
- * POST /:id/stop bricht den laufenden Turn ab
13
- * GET /sessions persistierte Unterhaltungen
14
- * DELETE /:id loescht eine Unterhaltung
15
- * Rueckgabe true heisst: Anfrage wurde behandelt.
16
- */
17
- export declare function createChatHandler({ manager, prefix, cors }: ChatHandlerOptions): (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
package/server/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export type { AgentConfig, AgentTool, ChatSessionLike, ChatSessionProvider, OpenAiMessage, OpenAiToolCall, SessionState, SessionInfo, SessionStore, } from "./types";
2
- export { AgentSession } from "./session";
3
- export { SessionManager } from "./manager";
4
- export { MemorySessionStore, FileSessionStore } from "./store";
5
- export { createChatHandler } from "./http";
6
- export { streamChatCompletion } from "./openai";