@widgetic/chat 0.1.35 → 0.1.36

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.
@@ -2,6 +2,7 @@ import type { ChatMessage, ChatContext } from '../types/index.js';
2
2
  import type { ClarificationSuggestion, DesignControlRequest, VersionRating } from '../types/message.js';
3
3
  import { type VersionThumb } from '../utils/versionRatings.js';
4
4
  import type { Snippet } from 'svelte';
5
+ import { type GenerationPlanWire } from '../utils/generationPlan.js';
5
6
  interface Props {
6
7
  class?: string;
7
8
  messages: ChatMessage[];
@@ -42,26 +43,33 @@ interface Props {
42
43
  /**
43
44
  * Every saved version for this widget. When one prompt produced two versions
44
45
  * but the chat stored only one user message, the missing older version is
45
- * shown as its own turn so "You are here" can land on it.
46
+ * shown as its own turn, so each version has its own place in the list.
46
47
  */
47
48
  versionTimeline?: Array<{
48
49
  version: number;
49
50
  sha: string;
50
51
  prompt: string;
51
52
  }>;
52
- /** Dropdown selection. The badge follows this version, not only a commit sha. */
53
- viewingVersion?: number | null;
54
53
  /** When false, hide commit hashes next to the version label (user mode). */
55
54
  showCommitMeta?: boolean;
56
- /** True while codegen / send is in flight — suppresses premature Retry. */
55
+ /** True while codegen / send is in flight — no icons are drawn under the last message and no restore is offered. */
57
56
  isGenerating?: boolean;
58
57
  /** Tail of the model stream for the generation in flight. Empty when it is only thinking. */
59
58
  generationStream?: string;
59
+ /** Rolling tail of streamed model reasoning during codegen. */
60
+ generationThinking?: string;
61
+ /** Gateway build plan while codegen runs; `null` hides the card. */
62
+ generationPlan?: GenerationPlanWire | null;
60
63
  onSuggestionSelected?: (suggestion: string) => void;
64
+ /**
65
+ * Draws a restore icon on the messages the person sent, shown when the pointer is over the message. Pressing it asks the host to
66
+ * put the widget back to how it was BEFORE that message: called with the id of the saved reply that stands for that earlier state
67
+ * and its place in `messages`. Without it no restore icon is drawn.
68
+ */
61
69
  onRestoreCheckpoint?: (messageId: string, messageIndex: number) => void;
62
70
  /**
63
- * Gives each version a thumbs up and a thumbs down next to its name. Called with the id of the assistant message that
64
- * announced the version and the thumb that was pressed; the host keeps the rating. Without it no thumbs are drawn.
71
+ * Gives the last message a thumbs up and a thumbs down (next to copy and regenerate). Called with the id of the assistant message
72
+ * that announced the version and the thumb that was pressed; the host keeps the rating. Without it no thumbs are drawn.
65
73
  */
66
74
  onRateVersion?: (messageId: string, pressed: VersionThumb) => void;
67
75
  /** The rating each version has, by the id of the message that announced it: what the thumbs show as pressed. */
@@ -0,0 +1,125 @@
1
+ <script lang="ts">
2
+ /**
3
+ * One small icon button of the chat's message rows: copy, regenerate, the two thumbs and the restore icon. It is the only place
4
+ * these icons get their look, so the five can never drift apart.
5
+ *
6
+ * The button names itself (`label`) for a screen reader and shows the same words as a tooltip, above the button (a row of icons) or
7
+ * on the side the line starts (an icon at the end of a row, where a tooltip above would cover the message it belongs to).
8
+ * The label is already in the language of the chat: the parent asks the catalog for it.
9
+ */
10
+ import type { Snippet } from 'svelte';
11
+
12
+ interface Props {
13
+ /** What the button does: its accessible name and its tooltip. */
14
+ label: string;
15
+ onclick: (event: MouseEvent) => void;
16
+ /** Where the tooltip opens. `start` is the side the line starts on, so it turns around on a right to left screen. */
17
+ tooltipSide?: 'above' | 'start';
18
+ /** For a toggle (a thumb): whether it is chosen. Left out, the button is a plain button. */
19
+ pressed?: boolean;
20
+ children: Snippet;
21
+ }
22
+
23
+ let { label, onclick, tooltipSide = 'above', pressed = undefined, children }: Props = $props();
24
+ </script>
25
+
26
+ <button
27
+ type="button"
28
+ class={['wc-icon-btn', { 'wc-icon-btn-tip-start': tooltipSide === 'start' }]}
29
+ aria-label={label}
30
+ aria-pressed={pressed}
31
+ data-tooltip={label}
32
+ {onclick}
33
+ >
34
+ {@render children()}
35
+ </button>
36
+
37
+ <style>
38
+ .wc-icon-btn {
39
+ position: relative;
40
+ display: inline-flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ width: 28px;
44
+ height: 28px;
45
+ padding: 0;
46
+ border: 0;
47
+ border-radius: 8px;
48
+ background: transparent;
49
+ color: #6b7280;
50
+ cursor: pointer;
51
+ transition: background-color 0.15s ease, color 0.15s ease;
52
+ }
53
+
54
+ .wc-icon-btn:hover {
55
+ background: rgba(107, 114, 128, 0.16);
56
+ color: #111827;
57
+ }
58
+
59
+ .wc-icon-btn:focus-visible {
60
+ outline: 2px solid #93c5fd;
61
+ outline-offset: 1px;
62
+ }
63
+
64
+ /* A chosen thumb: the icon is filled by its own markup, and the button reads darker. */
65
+ .wc-icon-btn[aria-pressed='true'] {
66
+ color: #111827;
67
+ }
68
+
69
+ /* The tooltip: the button's own words, a moment after the pointer rests on it (or at once for the keyboard). */
70
+ .wc-icon-btn::after {
71
+ content: attr(data-tooltip);
72
+ position: absolute;
73
+ z-index: 20;
74
+ bottom: calc(100% + 6px);
75
+ left: 50%;
76
+ transform: translateX(-50%);
77
+ padding: 4px 8px;
78
+ border: 1px solid #e5e7eb;
79
+ border-radius: 8px;
80
+ background: #ffffff;
81
+ color: #111827;
82
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
83
+ font-size: 11px;
84
+ font-weight: 500;
85
+ line-height: 1.2;
86
+ white-space: nowrap;
87
+ pointer-events: none;
88
+ opacity: 0;
89
+ visibility: hidden;
90
+ transition: opacity 0.1s ease;
91
+ }
92
+
93
+ .wc-icon-btn:hover::after {
94
+ opacity: 1;
95
+ visibility: visible;
96
+ transition-delay: 0.3s;
97
+ }
98
+
99
+ .wc-icon-btn:focus-visible::after {
100
+ opacity: 1;
101
+ visibility: visible;
102
+ }
103
+
104
+ .wc-icon-btn-tip-start::after {
105
+ top: 50%;
106
+ bottom: auto;
107
+ left: auto;
108
+ inset-inline-end: calc(100% + 6px);
109
+ transform: translateY(-50%);
110
+ }
111
+
112
+ /* A finger has no hover: no tooltip is left behind after a tap. */
113
+ @media (hover: none) {
114
+ .wc-icon-btn::after {
115
+ display: none;
116
+ }
117
+ }
118
+
119
+ @media (prefers-reduced-motion: reduce) {
120
+ .wc-icon-btn,
121
+ .wc-icon-btn::after {
122
+ transition: none;
123
+ }
124
+ }
125
+ </style>
@@ -0,0 +1,22 @@
1
+ /**
2
+ * One small icon button of the chat's message rows: copy, regenerate, the two thumbs and the restore icon. It is the only place
3
+ * these icons get their look, so the five can never drift apart.
4
+ *
5
+ * The button names itself (`label`) for a screen reader and shows the same words as a tooltip, above the button (a row of icons) or
6
+ * on the side the line starts (an icon at the end of a row, where a tooltip above would cover the message it belongs to).
7
+ * The label is already in the language of the chat: the parent asks the catalog for it.
8
+ */
9
+ import type { Snippet } from 'svelte';
10
+ interface Props {
11
+ /** What the button does: its accessible name and its tooltip. */
12
+ label: string;
13
+ onclick: (event: MouseEvent) => void;
14
+ /** Where the tooltip opens. `start` is the side the line starts on, so it turns around on a right to left screen. */
15
+ tooltipSide?: 'above' | 'start';
16
+ /** For a toggle (a thumb): whether it is chosen. Left out, the button is a plain button. */
17
+ pressed?: boolean;
18
+ children: Snippet;
19
+ }
20
+ declare const IconButton: import("svelte").Component<Props, {}, "">;
21
+ type IconButton = ReturnType<typeof IconButton>;
22
+ export default IconButton;
@@ -0,0 +1,48 @@
1
+ <script lang="ts">
2
+ import type { VersionRating } from '../types/message.js';
3
+ import { useChatLanguage } from '../i18n/language.js';
4
+ import { copyTextToClipboard } from '../utils/messageActions.js';
5
+ import type { VersionThumb } from '../utils/versionRatings.js';
6
+ import { MessageRatingActions } from '@widgetic/design-system/components/chat/index';
7
+
8
+ const { t } = useChatLanguage();
9
+
10
+ interface Props {
11
+ copyText: string;
12
+ canRegenerate: boolean;
13
+ onRegenerate: () => void;
14
+ ratedMessageId: string | null;
15
+ rating?: VersionRating;
16
+ onRate: (messageId: string, pressed: VersionThumb) => void;
17
+ }
18
+
19
+ let { copyText, canRegenerate, onRegenerate, ratedMessageId, rating = 'none', onRate }: Props = $props();
20
+
21
+ async function handleCopy() {
22
+ try {
23
+ await copyTextToClipboard(copyText);
24
+ } catch (error) {
25
+ console.warn('[Chat] Copy of the message failed:', error);
26
+ }
27
+ }
28
+ </script>
29
+
30
+ <div role="group" aria-label={$t('chat.messages.actions')}>
31
+ <MessageRatingActions
32
+ {copyText}
33
+ {canRegenerate}
34
+ {ratedMessageId}
35
+ {rating}
36
+ onCopy={copyText !== '' ? handleCopy : undefined}
37
+ onRegenerate={canRegenerate ? onRegenerate : undefined}
38
+ onRate={ratedMessageId ? onRate : undefined}
39
+ messages={{
40
+ copy: $t('chat.messages.copy'),
41
+ copied: $t('chat.messages.copied'),
42
+ regenerate: $t('chat.messages.regenerate'),
43
+ rateGroup: $t('chat.messages.rateGroup'),
44
+ rateUp: $t('chat.messages.rateUp'),
45
+ rateDown: $t('chat.messages.rateDown')
46
+ }}
47
+ />
48
+ </div>
@@ -0,0 +1,13 @@
1
+ import type { VersionRating } from '../types/message.js';
2
+ import type { VersionThumb } from '../utils/versionRatings.js';
3
+ interface Props {
4
+ copyText: string;
5
+ canRegenerate: boolean;
6
+ onRegenerate: () => void;
7
+ ratedMessageId: string | null;
8
+ rating?: VersionRating;
9
+ onRate: (messageId: string, pressed: VersionThumb) => void;
10
+ }
11
+ declare const MessageActions: import("svelte").Component<Props, {}, "">;
12
+ type MessageActions = ReturnType<typeof MessageActions>;
13
+ export default MessageActions;
@@ -0,0 +1,44 @@
1
+ <script lang="ts">
2
+ import { ChatHeader } from '@widgetic/design-system/components/chat/index';
3
+ import { useChatLanguage } from '../i18n/language.js';
4
+
5
+ interface Props {
6
+ title?: string;
7
+ showConsole?: boolean;
8
+ consoleOpen?: boolean;
9
+ onToggleConsole?: () => void;
10
+ onNewConversation?: () => void;
11
+ onOpenHistory?: () => void;
12
+ onTitleClick?: () => void;
13
+ }
14
+
15
+ let {
16
+ title = '',
17
+ showConsole = false,
18
+ consoleOpen = false,
19
+ onToggleConsole,
20
+ onNewConversation,
21
+ onOpenHistory,
22
+ onTitleClick
23
+ }: Props = $props();
24
+
25
+ const { t } = useChatLanguage();
26
+ </script>
27
+
28
+ <ChatHeader
29
+ layout="panel"
30
+ class="border-border bg-background border-b"
31
+ title={title}
32
+ {showConsole}
33
+ {consoleOpen}
34
+ onToggleConsole={onToggleConsole}
35
+ onNewChat={onNewConversation}
36
+ onHistory={onOpenHistory}
37
+ onTitleClick={onTitleClick}
38
+ messages={{
39
+ newChat: $t('chat.header.newConversationTitle'),
40
+ history: $t('chat.header.switchConversation'),
41
+ console: $t('chat.header.console'),
42
+ openHistory: $t('chat.header.switchConversation')
43
+ }}
44
+ />
@@ -0,0 +1,12 @@
1
+ interface Props {
2
+ title?: string;
3
+ showConsole?: boolean;
4
+ consoleOpen?: boolean;
5
+ onToggleConsole?: () => void;
6
+ onNewConversation?: () => void;
7
+ onOpenHistory?: () => void;
8
+ onTitleClick?: () => void;
9
+ }
10
+ declare const PanelChatHeader: import("svelte").Component<Props, {}, "">;
11
+ type PanelChatHeader = ReturnType<typeof PanelChatHeader>;
12
+ export default PanelChatHeader;
@@ -1,199 +1,47 @@
1
1
  <script lang="ts">
2
2
  import { createEventDispatcher } from 'svelte';
3
- import { chatLog } from '../utils/logger.js';
4
3
  import type { ChatContext } from '../types/context.js';
5
4
  import { useChatLanguage } from '../i18n/language.js';
6
5
  import { suggestionKeysFor, suggestionTitleKeyFor } from '../i18n/suggestions.js';
7
- import { dirForUserText, useTextDirection } from '@widgetic/design-system/components/textDirection';
6
+ import { SuggestionCard } from '@widgetic/design-system/components/chat/index';
8
7
 
9
- // The words of the ideas, in the language of the chat above
10
8
  const { t } = useChatLanguage();
11
9
 
12
- // The way the screen is read: a suggestion is a sentence the assistant wrote, and reads by its own first letter on a right to left screen.
13
- const textDirection = useTextDirection();
14
-
15
- // Props
16
10
  interface Props {
17
11
  context: ChatContext;
18
12
  visible?: boolean;
19
13
  onHide?: () => void;
20
14
  }
21
-
15
+
22
16
  let { context, visible = true, onHide }: Props = $props();
23
-
17
+
24
18
  const dispatch = createEventDispatcher();
25
-
19
+
26
20
  function handleSuggestionClick(suggestion: string) {
27
- // chatLog('Suggestion clicked:', suggestion);
28
21
  dispatch('suggestionSelected', { suggestion });
29
22
  }
30
-
31
- // Get suggestions for current context
23
+
32
24
  let suggestionKeys = $derived(suggestionKeysFor(context.type));
33
25
  let titleKey = $derived(suggestionTitleKeyFor(context.type));
34
26
  </script>
35
27
 
36
28
  {#if visible && suggestionKeys.length > 0}
37
- <div class="suggestion-container">
38
- <div class="suggestion-header">
39
- <h4 class="suggestion-title">
29
+ <div class="suggestion-container flex w-full max-w-full flex-col gap-1">
30
+ <div class="flex items-center justify-between gap-2">
31
+ <h4 class="text-caption text-muted-foreground">
40
32
  {$t(titleKey)}
41
33
  </h4>
42
34
  {#if onHide}
43
- <button
44
- class="hide-suggestions-btn"
45
- onclick={onHide}
46
- >
35
+ <button type="button" class="text-caption text-muted-foreground hover:text-foreground" onclick={onHide}>
47
36
  {$t('chat.suggestions.hide')}
48
37
  </button>
49
38
  {/if}
50
39
  </div>
51
-
52
- <div class="suggestion-grid">
40
+ <div class="flex w-full flex-col gap-1">
53
41
  {#each suggestionKeys as suggestionKey (suggestionKey)}
54
42
  {@const suggestion = $t(suggestionKey)}
55
- <button
56
- class="suggestion-button"
57
- onclick={() => handleSuggestionClick(suggestion)}
58
- title={suggestion}
59
- >
60
- <span class="suggestion-text" dir={dirForUserText($textDirection)}>{suggestion}</span>
61
- <svg class="suggestion-arrow" viewBox="0 0 20 20" fill="currentColor">
62
- <path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
63
- </svg>
64
- </button>
43
+ <SuggestionCard title={suggestion} onclick={() => handleSuggestionClick(suggestion)} />
65
44
  {/each}
66
45
  </div>
67
-
68
46
  </div>
69
47
  {/if}
70
-
71
- <style>
72
- .suggestion-container {
73
- padding: 1.5rem;
74
- background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
75
- border-radius: 0.75rem;
76
- border: 1px solid #e2e8f0;
77
- margin: 1rem;
78
- }
79
-
80
- .suggestion-header {
81
- display: flex;
82
- flex-direction: column;
83
- align-items: center;
84
- gap: 0.5rem;
85
- margin-bottom: 1rem;
86
- }
87
-
88
- .suggestion-title {
89
- font-size: 0.875rem;
90
- font-weight: 600;
91
- color: #1e293b;
92
- margin: 0;
93
- display: flex;
94
- align-items: center;
95
- gap: 0.5rem;
96
- text-align: center;
97
- }
98
-
99
- .hide-suggestions-btn {
100
- font-size: 0.75rem;
101
- color: #64748b;
102
- background: none;
103
- border: 1px solid #e2e8f0;
104
- border-radius: 9999px;
105
- padding: 0.25rem 0.75rem;
106
- cursor: pointer;
107
- transition: all 0.15s ease;
108
- white-space: nowrap;
109
- }
110
-
111
- .hide-suggestions-btn:hover {
112
- color: #374151;
113
- border-color: #cbd5e1;
114
- background: #f8fafc;
115
- }
116
-
117
- .suggestion-grid {
118
- display: grid;
119
- gap: 0.75rem;
120
- grid-template-columns: 1fr;
121
- }
122
-
123
- .suggestion-button {
124
- display: flex;
125
- align-items: center;
126
- justify-content: space-between;
127
- padding: 0.875rem 1rem;
128
- background: white;
129
- border: 1px solid #e2e8f0;
130
- border-radius: 0.5rem;
131
- color: #374151;
132
- font-size: 0.875rem;
133
- text-align: start;
134
- cursor: pointer;
135
- transition: all 0.2s ease;
136
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
137
- }
138
-
139
- .suggestion-button:hover {
140
- background: #f8fafc;
141
- border-color: #3b82f6;
142
- color: #1d4ed8;
143
- transform: translateY(-1px);
144
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
145
- }
146
-
147
- .suggestion-button:active {
148
- transform: translateY(0);
149
- }
150
-
151
- .suggestion-text {
152
- flex: 1;
153
- line-height: 1.4;
154
- }
155
-
156
- .suggestion-arrow {
157
- width: 1rem;
158
- height: 1rem;
159
- margin-inline-start: 0.75rem;
160
- opacity: 0.5;
161
- transition: all 0.2s ease;
162
- flex-shrink: 0;
163
- }
164
-
165
- .suggestion-button:hover .suggestion-arrow {
166
- opacity: 1;
167
- transform: translateX(2px);
168
- }
169
-
170
-
171
- /* Responsive adjustments */
172
- @media (min-width: 400px) {
173
- .suggestion-grid {
174
- grid-template-columns: 1fr;
175
- }
176
- }
177
-
178
- /* Animation for initial appearance */
179
- .suggestion-container {
180
- animation: fadeInUp 0.3s ease-out;
181
- }
182
-
183
- @keyframes fadeInUp {
184
- from {
185
- opacity: 0;
186
- transform: translateY(10px);
187
- }
188
- to {
189
- opacity: 1;
190
- transform: translateY(0);
191
- }
192
- }
193
-
194
- /* Focus styles for accessibility */
195
- .suggestion-button:focus-visible {
196
- outline: none;
197
- box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.1);
198
- }
199
- </style>
@@ -33,32 +33,53 @@ export declare const CHAT_MESSAGES: {
33
33
  readonly 'chat.header.untitled': "Untitled";
34
34
  readonly 'chat.header.newConversationTitle': "New conversation";
35
35
  readonly 'chat.header.newConversation': "Start new conversation";
36
+ /** Label for the debug console icon in the panel chat header. */
37
+ readonly 'chat.header.console': "Console";
36
38
  readonly 'chat.header.close': "Close chat";
37
39
  /** The name of the button that expands a chat that is shown as a small card. */
38
40
  readonly 'chat.contextPreview.expand': "Expand {name} chat context";
39
41
  readonly 'chat.conversation.defaultTitle': "Chat about {name}";
40
- readonly 'chat.messages.startTitle': "Start a conversation";
41
- readonly 'chat.messages.startHint': "Ask a question about your {type} to get started.";
42
+ /** The hero of an empty chat (Figma: Chat / Empty). */
43
+ readonly 'chat.messages.emptyTitle': "What do you want to build?";
44
+ readonly 'chat.messages.emptyHint': "Sketch it on the canvas, or describe it here.";
42
45
  readonly 'chat.messages.loadingHistory': "Loading chat history...";
43
46
  /** Said while the assistant works on an answer. */
44
47
  readonly 'chat.messages.thinking': "Assistant is thinking";
45
- /** The mark on the turn of the version that is open now, and the line that explains it. */
46
- readonly 'chat.messages.viewing': "You are here";
47
- readonly 'chat.messages.viewingTitle': "This is the version you are looking at";
48
+ /** Header while streamed reasoning is visible during codegen. */
49
+ readonly 'chat.generation.thinking': "Thinking";
50
+ /** Header while streamed code is visible during codegen. */
51
+ readonly 'chat.generation.writingCode': "Writing code";
52
+ /** Collapsed reasoning summary after code begins streaming. */
53
+ readonly 'chat.generation.thoughtFor': "Thought for {seconds} s";
54
+ readonly 'chat.generation.expandThought': "Show thinking";
55
+ readonly 'chat.generation.collapseThought': "Hide thinking";
56
+ /** Polite screen-reader line when codegen enters the thinking phase. */
57
+ readonly 'chat.generation.statusThinking': "Assistant is thinking";
58
+ /** Polite screen-reader line when codegen enters the writing-code phase. */
59
+ readonly 'chat.generation.statusWritingCode': "Assistant is writing code";
60
+ /** Heading when the gateway plan has no title. */
61
+ readonly 'chat.plan.title': "Build plan";
62
+ /** Progress badge on the plan card (`{current}` / `{total}`). */
63
+ readonly 'chat.plan.progress': "{current} of {total}";
64
+ readonly 'chat.plan.showMoreTasks': "Show {count} more tasks";
65
+ readonly 'chat.plan.showFewerTasks': "Show fewer tasks";
66
+ /** Accessible name for the plan region while codegen runs. */
67
+ readonly 'chat.plan.regionLabel': "Widget build plan";
48
68
  readonly 'chat.messages.attachmentMissingTitle': "Attachment not available";
49
69
  readonly 'chat.messages.attachmentMissingLabel': "Missing file attachment";
50
- readonly 'chat.messages.attachmentMissingCaption': "Attachment not saved. Re-attach with Upload, then Retry.";
51
- readonly 'chat.messages.retry': "Retry";
52
- readonly 'chat.messages.retryPromptTitle': "Run this prompt again as its own message. The sketch stays with the model, not on the bubble.";
53
- readonly 'chat.messages.retryLastTitle': "Retry the last user prompt (same generation request)";
70
+ readonly 'chat.messages.attachmentMissingCaption': "Attachment not saved. Re-attach with Upload, then send it again.";
54
71
  readonly 'chat.messages.upgrade': "Upgrade";
55
72
  readonly 'chat.messages.upgradeTitle': "Open plans and billing";
56
73
  /** Under a prompt: the short id of the commit it made. */
57
74
  readonly 'chat.messages.commitId': "(commit id: {id})";
75
+ /** The icon on a message the person sent: puts the widget back to how it was before that message. Its tooltip and its name. */
58
76
  readonly 'chat.messages.restore': "Restore Checkpoint";
59
- readonly 'chat.messages.restoreTitle': "Restore widget code to this prompt's commit";
60
- readonly 'chat.messages.alreadyHead': "This checkpoint is already HEAD";
61
- /** The two thumbs next to a version's name, when the page gave the chat a way to keep a rating (`onRateVersion`). */
77
+ /** The icons at the end of the last message: the name of the row, copy (and what it says once done), run again, and the two thumbs. */
78
+ readonly 'chat.messages.actions': "Message actions";
79
+ readonly 'chat.messages.copy': "Copy";
80
+ readonly 'chat.messages.copied': "Copied";
81
+ readonly 'chat.messages.regenerate': "Regenerate";
82
+ /** The two thumbs, when the page gave the chat a way to keep a rating (`onRateVersion`). */
62
83
  readonly 'chat.messages.rateGroup': "Rate this version";
63
84
  readonly 'chat.messages.rateUp': "This version is good";
64
85
  readonly 'chat.messages.rateDown': "This version is not good";
@@ -106,6 +127,13 @@ export declare const CHAT_MESSAGES: {
106
127
  readonly 'chat.input.stop': "Stop generation";
107
128
  readonly 'chat.input.sending': "Sending message...";
108
129
  readonly 'chat.input.send': "Send message";
130
+ readonly 'chat.input.tooLong': "Message is too long";
131
+ readonly 'chat.composer.assistant': "Assistant";
132
+ readonly 'chat.messages.scrollToBottom': "Scroll to latest messages";
133
+ readonly 'chat.messages.clarificationPrompt': "Which option fits best?";
134
+ readonly 'chat.checkpoint.version': "Version {n}";
135
+ readonly 'chat.checkpoint.redo': "Redo";
136
+ readonly 'chat.checkpoint.restored': "Restored to version {n}";
109
137
  readonly 'chat.actions.screenshot': "Screenshot";
110
138
  readonly 'chat.actions.screenshotTitle': "Take Screenshot";
111
139
  readonly 'chat.actions.screenshotLabel': "Take screenshot of current content";