@promptbook/javascript 0.112.0-30 → 0.112.0-32

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 (57) hide show
  1. package/esm/index.es.js +1 -1
  2. package/esm/src/_packages/components.index.d.ts +6 -0
  3. package/esm/src/_packages/types.index.d.ts +6 -0
  4. package/esm/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
  5. package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
  6. package/esm/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
  7. package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
  8. package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
  9. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +17 -1
  10. package/esm/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
  11. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
  12. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
  13. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
  14. package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  15. package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +9 -0
  16. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
  17. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
  18. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
  19. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
  20. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
  21. package/esm/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
  22. package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
  23. package/esm/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
  24. package/esm/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
  25. package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
  26. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
  27. package/esm/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
  28. package/esm/src/version.d.ts +1 -1
  29. package/package.json +2 -2
  30. package/umd/index.umd.js +1 -1
  31. package/umd/src/_packages/components.index.d.ts +6 -0
  32. package/umd/src/_packages/types.index.d.ts +6 -0
  33. package/umd/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
  34. package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
  35. package/umd/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
  36. package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
  37. package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
  38. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +17 -1
  39. package/umd/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
  40. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
  41. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
  42. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
  43. package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  44. package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +9 -0
  45. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
  46. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
  47. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
  48. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
  49. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
  50. package/umd/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
  51. package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
  52. package/umd/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
  53. package/umd/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
  54. package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
  55. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
  56. package/umd/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
  57. package/umd/src/version.d.ts +1 -1
@@ -0,0 +1,2 @@
1
+ /** @jest-environment jsdom */
2
+ export {};
@@ -1,6 +1,9 @@
1
1
  import { Message } from '../../../types/Message';
2
+ import type { LlmToolDefinition } from '../../../types/LlmToolDefinition';
3
+ import type { ChatModelRequirements } from '../../../types/ModelRequirements';
2
4
  import type { ToolCall } from '../../../types/ToolCall';
3
- import type { id, string_date_iso8601, string_markdown } from '../../../types/typeAliases';
5
+ import type { TODO_object } from '../../../utils/organization/TODO_object';
6
+ import type { id, Parameters, string_date_iso8601, string_markdown, string_prompt, string_title } from '../../../types/typeAliases';
4
7
  export type ChatToolCall = ToolCall;
5
8
  /**
6
9
  * One item in a user-facing progress card shown while assistant response is still running.
@@ -52,6 +55,63 @@ export type ChatProgressCard = {
52
55
  */
53
56
  readonly isVisible?: boolean;
54
57
  };
58
+ /**
59
+ * Serializable prompt snapshot stored alongside one assistant message for debugging and inspection.
60
+ */
61
+ type ChatMessagePrompt = {
62
+ /**
63
+ * Human-readable label used for the prompt execution.
64
+ */
65
+ readonly title: string_title;
66
+ /**
67
+ * User-facing chat content submitted into the prompt pipeline.
68
+ */
69
+ readonly content: string_prompt;
70
+ /**
71
+ * Resolved prompt parameters passed into the agent turn.
72
+ */
73
+ readonly parameters: Parameters;
74
+ /**
75
+ * Chat-model requirements used when the turn was executed.
76
+ */
77
+ readonly modelRequirements: ChatModelRequirements;
78
+ /**
79
+ * Prior thread history provided to the prompt.
80
+ */
81
+ readonly thread?: ReadonlyArray<ChatMessage>;
82
+ /**
83
+ * Attachments submitted with the user turn.
84
+ */
85
+ readonly attachments?: ReadonlyArray<{
86
+ name: string;
87
+ type: string;
88
+ url: string;
89
+ }>;
90
+ /**
91
+ * Runtime tools explicitly passed on the chat prompt object.
92
+ */
93
+ readonly tools?: ReadonlyArray<LlmToolDefinition>;
94
+ /**
95
+ * Full list of tools available to the model for this turn.
96
+ */
97
+ readonly availableTools?: ReadonlyArray<LlmToolDefinition>;
98
+ /**
99
+ * Tool calls associated with the generated message, duplicated here for raw prompt inspection.
100
+ */
101
+ readonly toolCalls?: ReadonlyArray<ChatToolCall>;
102
+ /**
103
+ * Completed tool calls associated with the generated message, duplicated here for raw prompt inspection.
104
+ */
105
+ readonly completedToolCalls?: ReadonlyArray<ChatToolCall>;
106
+ /**
107
+ * Provider-facing prompt text after agent/runtime preparation, when available.
108
+ */
109
+ readonly rawPromptContent?: string_prompt;
110
+ /**
111
+ * Provider-facing raw request payload, when available.
112
+ */
113
+ readonly rawRequest?: TODO_object | null;
114
+ };
55
115
  /**
56
116
  * Represents a single message within a chat interface.
57
117
  *
@@ -165,7 +225,23 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
165
225
  * Optional structured progress-card payload shown while a response is still in progress.
166
226
  */
167
227
  readonly progressCard?: ChatProgressCard;
228
+ /**
229
+ * Optional list of tools that were available to the model when generating this message.
230
+ *
231
+ * This field is populated by the server from the exact tool definitions passed to the LLM
232
+ * request so developers can inspect what capabilities the model had access to during
233
+ * each conversation turn.
234
+ */
235
+ readonly availableTools?: ReadonlyArray<LlmToolDefinition>;
236
+ /**
237
+ * Optional prompt snapshot from which this message was generated.
238
+ *
239
+ * Intended for advanced/raw inspection so developers can see the exact chat prompt,
240
+ * resolved parameters, tool availability, and provider payload associated with one turn.
241
+ */
242
+ readonly prompt?: ChatMessagePrompt;
168
243
  };
244
+ export {};
169
245
  /**
170
246
  * TODO: Make all fields readonly
171
247
  * TODO: Delete `expectedAnswer` from ChatMessage
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Locale-aware date/time labels derived from one tool-call timestamp.
3
+ *
4
+ * @private utility of `<Chat/>`
5
+ */
6
+ type ToolCallDateTimeLabels = {
7
+ /**
8
+ * Primary local time label shown in chips and clock panels.
9
+ */
10
+ readonly localTimeLabel: string;
11
+ /**
12
+ * Local calendar date label shown under the primary time.
13
+ */
14
+ readonly localDateLabel: string;
15
+ /**
16
+ * Exact local timestamp label used in detail sections.
17
+ */
18
+ readonly localDateTimeLabel: string;
19
+ /**
20
+ * Relative label such as `in 5 minutes` or `2 minutes ago`.
21
+ */
22
+ readonly relativeTimeLabel: string | null;
23
+ };
24
+ /**
25
+ * Formats one tool-call timestamp into shared locale-aware labels.
26
+ *
27
+ * @param date - Timestamp to format.
28
+ * @param options - Optional locale and relative-time reference point.
29
+ * @returns Shared labels consumed by tool-call chips and modals.
30
+ *
31
+ * @private utility of `<Chat/>`
32
+ */
33
+ export declare function formatToolCallDateTime(date: Date, options?: {
34
+ locale?: string;
35
+ currentDate?: Date;
36
+ }): ToolCallDateTimeLabels;
37
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Formats a Date as a locale-aware short time string (e.g. "5:30 PM" or "17:30").
3
+ *
4
+ * @param date - Date to format.
5
+ * @param locale - Optional BCP-47 locale string (e.g. `"en"`, `"cs"`).
6
+ * When omitted the browser/OS default locale is used.
7
+ * @returns Formatted time string such as `"5:30 PM"` or `"17:30"`.
8
+ *
9
+ * @private utility of `<Chat/>`
10
+ */
11
+ export declare function formatToolCallLocalTime(date: Date, locale?: string): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Applies `{placeholder}` values to one tool-call translation template.
3
+ *
4
+ * @param template - Template from the host application or fallback copy.
5
+ * @param variables - Placeholder values keyed by variable name.
6
+ * @returns Formatted string ready for rendering.
7
+ *
8
+ * @private utility of `<Chat/>`
9
+ */
10
+ export declare function formatToolCallTranslationTemplate(template: string, variables: Record<string, string | number>): string;
@@ -1,3 +1,4 @@
1
+ import 'moment/locale/cs';
1
2
  import type { ChatMessage } from '../types/ChatMessage';
2
3
  /**
3
4
  * Display-ready timestamp values for a chat message.
@@ -21,6 +22,9 @@ export type ChatMessageTimingDisplay = {
21
22
  /**
22
23
  * Builds display-ready timestamp and duration labels for a chat message.
23
24
  *
25
+ * @param message - Message with optional timestamp metadata.
26
+ * @param locale - Optional moment locale used for formatting.
27
+ *
24
28
  * @private utility of `<Chat/>` component
25
29
  */
26
- export declare function getChatMessageTimingDisplay(message: ChatMessage): ChatMessageTimingDisplay | null;
30
+ export declare function getChatMessageTimingDisplay(message: ChatMessage, locale?: string): ChatMessageTimingDisplay | null;
@@ -15,6 +15,25 @@ export type ToolCallChipletInfo = {
15
15
  */
16
16
  agentData?: AgentChipData;
17
17
  };
18
+ /**
19
+ * Optional user-facing title overrides for technical tool names.
20
+ *
21
+ * @private utility of `<Chat/>`
22
+ */
23
+ type ToolCallTitleOverrides = Readonly<Record<string, string>>;
24
+ /**
25
+ * Optional localized labels used for user-facing chip text.
26
+ *
27
+ * @private utility of `<Chat/>`
28
+ */
29
+ type ToolCallChipTranslations = {
30
+ readonly toolCallTimeChipLabel?: string;
31
+ readonly toolCallTimeoutChipLabel?: string;
32
+ readonly toolCallTimeoutChipCancelledLabel?: string;
33
+ readonly toolCallTimeoutChipInactiveLabel?: string;
34
+ readonly toolCallTimeoutChipUpdatedLabel?: string;
35
+ readonly toolCallTimeoutChipFallbackLabel?: string;
36
+ };
18
37
  /**
19
38
  * Builds display text for a tool call chiplet.
20
39
  *
@@ -35,6 +54,12 @@ export declare const TOOL_TITLES: Record<string, {
35
54
  /**
36
55
  * Gets the chiplet information including text and agent data (for team tools).
37
56
  *
57
+ * @param toolCall - Tool call to build chiplet info for.
58
+ * @param locale - Optional BCP-47 locale string used to format time labels.
59
+ * @param titleOverrides - Optional localized titles keyed by tool name.
60
+ * @param chipTranslations - Optional localized chip templates for time-related tools.
61
+ *
38
62
  * @private [🧠] Maybe public?
39
63
  */
40
- export declare function getToolCallChipletInfo(toolCall: ToolCall): ToolCallChipletInfo;
64
+ export declare function getToolCallChipletInfo(toolCall: ToolCall, locale?: string, titleOverrides?: ToolCallTitleOverrides, chipTranslations?: ToolCallChipTranslations): ToolCallChipletInfo;
65
+ export {};
@@ -64,6 +64,24 @@ export type TimeoutToolCallPresentation = {
64
64
  */
65
65
  readonly localDueDateLabel: string | null;
66
66
  };
67
+ /**
68
+ * Optional localized labels used by timeout chips and friendly modal copy.
69
+ *
70
+ * @private internal utility of `<Chat/>`
71
+ */
72
+ type TimeoutToolCallTranslations = {
73
+ readonly toolCallTimeoutChipLabel?: string;
74
+ readonly toolCallTimeoutChipCancelledLabel?: string;
75
+ readonly toolCallTimeoutChipInactiveLabel?: string;
76
+ readonly toolCallTimeoutChipUpdatedLabel?: string;
77
+ readonly toolCallTimeoutChipFallbackLabel?: string;
78
+ readonly toolCallTimeoutPrimaryScheduledLabel?: string;
79
+ readonly toolCallTimeoutSecondaryDurationLabel?: string;
80
+ readonly toolCallTimeoutPrimaryCancelledLabel?: string;
81
+ readonly toolCallTimeoutPrimaryInactiveLabel?: string;
82
+ readonly toolCallTimeoutPrimaryUpdatedLabel?: string;
83
+ readonly toolCallTimeoutPrimaryFallbackLabel?: string;
84
+ };
67
85
  /**
68
86
  * Inputs required to derive timeout presentation metadata.
69
87
  *
@@ -86,6 +104,11 @@ type ResolveTimeoutToolCallPresentationOptions = {
86
104
  * Current date used to calculate relative labels.
87
105
  */
88
106
  readonly currentDate?: Date;
107
+ /**
108
+ * Optional BCP-47 locale string used to format local-time labels.
109
+ * When omitted the browser/OS default locale is used.
110
+ */
111
+ readonly locale?: string;
89
112
  };
90
113
  /**
91
114
  * Determines whether a tool name belongs to the timeout commitment.
@@ -104,19 +127,19 @@ export declare function resolveTimeoutToolCallPresentation(options: ResolveTimeo
104
127
  *
105
128
  * @private internal utility of `<Chat/>`
106
129
  */
107
- export declare function buildTimeoutToolCallChipLabel(presentation: TimeoutToolCallPresentation): string;
130
+ export declare function buildTimeoutToolCallChipLabel(presentation: TimeoutToolCallPresentation, translations?: TimeoutToolCallTranslations): string;
108
131
  /**
109
132
  * Builds the primary timeout sentence shown in default modal view.
110
133
  *
111
134
  * @private internal utility of `<Chat/>`
112
135
  */
113
- export declare function buildTimeoutToolPrimarySentence(presentation: TimeoutToolCallPresentation): string;
136
+ export declare function buildTimeoutToolPrimarySentence(presentation: TimeoutToolCallPresentation, translations?: TimeoutToolCallTranslations): string;
114
137
  /**
115
138
  * Builds one default-view scheduling sentence with local-time and relative context.
116
139
  *
117
140
  * @private internal utility of `<Chat/>`
118
141
  */
119
- export declare function buildTimeoutToolScheduleSentence(presentation: TimeoutToolCallPresentation): string | null;
142
+ export declare function buildTimeoutToolScheduleSentence(presentation: TimeoutToolCallPresentation, translations?: TimeoutToolCallTranslations): string | null;
120
143
  export {};
121
144
  /**
122
145
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1,4 +1,4 @@
1
- import type { ToolCall } from '../../types/ToolCall';
1
+ import { type ToolCall } from '../../types/ToolCall';
2
2
  /**
3
3
  * Merges streamed tool-call snapshots by stable identity while preserving incremental logs,
4
4
  * warnings, and partial results.
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-29`).
18
+ * It follows semantic versioning (e.g., `0.112.0-31`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/javascript",
3
- "version": "0.112.0-30",
3
+ "version": "0.112.0-32",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -97,7 +97,7 @@
97
97
  "module": "./esm/index.es.js",
98
98
  "typings": "./esm/typings/src/_packages/javascript.index.d.ts",
99
99
  "peerDependencies": {
100
- "@promptbook/core": "0.112.0-30"
100
+ "@promptbook/core": "0.112.0-32"
101
101
  },
102
102
  "dependencies": {
103
103
  "crypto": "1.0.1",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-30';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-32';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17,7 +17,10 @@ import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChat
17
17
  import { Chat } from '../book-components/Chat/Chat/Chat';
18
18
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
19
19
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
20
+ import type { ChatVisualMode } from '../book-components/Chat/Chat/ChatProps';
20
21
  import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
22
+ import type { ChatUiTranslations } from '../book-components/Chat/Chat/ChatProps';
23
+ import type { ChatTimingTranslations } from '../book-components/Chat/Chat/ChatProps';
21
24
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
22
25
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
23
26
  import { ChatSoundToggle } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -95,7 +98,10 @@ export type { AgentChatProps };
95
98
  export { Chat };
96
99
  export type { ChatFeedbackResponse };
97
100
  export type { ChatFeedbackMode };
101
+ export type { ChatVisualMode };
98
102
  export type { ChatFeedbackTranslations };
103
+ export type { ChatUiTranslations };
104
+ export type { ChatTimingTranslations };
99
105
  export type { ChatSoundSystem };
100
106
  export type { ChatProps };
101
107
  export { ChatSoundToggle };
@@ -18,7 +18,10 @@ import type { AgentChipData } from '../book-components/Chat/AgentChip/AgentChip'
18
18
  import type { AgentChipProps } from '../book-components/Chat/AgentChip/AgentChip';
19
19
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
20
20
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
21
+ import type { ChatVisualMode } from '../book-components/Chat/Chat/ChatProps';
21
22
  import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
23
+ import type { ChatUiTranslations } from '../book-components/Chat/Chat/ChatProps';
24
+ import type { ChatTimingTranslations } from '../book-components/Chat/Chat/ChatProps';
22
25
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
23
26
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
24
27
  import type { ChatSoundToggleProps } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -443,7 +446,10 @@ export type { AgentChipData };
443
446
  export type { AgentChipProps };
444
447
  export type { ChatFeedbackResponse };
445
448
  export type { ChatFeedbackMode };
449
+ export type { ChatVisualMode };
446
450
  export type { ChatFeedbackTranslations };
451
+ export type { ChatUiTranslations };
452
+ export type { ChatTimingTranslations };
447
453
  export type { ChatSoundSystem };
448
454
  export type { ChatProps };
449
455
  export type { ChatSoundToggleProps };
@@ -1,4 +1,5 @@
1
1
  import type { BookCommitment } from '../../commitments/_base/BookCommitment';
2
+ import type { TeammateProfile } from './TeammateProfileResolver';
2
3
  /**
3
4
  * Resolves compact agent references that appear inside FROM, IMPORT, and TEAM commitments.
4
5
  *
@@ -15,4 +16,14 @@ export type AgentReferenceResolver = {
15
16
  * @param content - Original payload of the commitment
16
17
  */
17
18
  resolveCommitmentContent(commitmentType: BookCommitment, content: string): Promise<string>;
19
+ /**
20
+ * Optional: returns the actual human-readable name and description for a teammate agent URL.
21
+ *
22
+ * When implemented, this enriches TEAM tool definitions with the agent's real name and
23
+ * persona description instead of technical IDs derived from the URL path.
24
+ *
25
+ * @param url - Canonical teammate URL from the resolved TEAM commitment content.
26
+ * @returns Agent profile or `null` when the URL is not resolvable locally.
27
+ */
28
+ resolveTeammateProfile?: (url: string) => Promise<TeammateProfile | null>;
18
29
  };
@@ -1,5 +1,6 @@
1
1
  import type { AgentReferenceResolver } from './AgentReferenceResolver';
2
2
  import type { InlineKnowledgeSourceUploader } from '../../utils/knowledge/inlineKnowledgeSource';
3
+ import type { TeammateProfileResolver } from './TeammateProfileResolver';
3
4
  /**
4
5
  * Options for `createAgentModelRequirements` and `createAgentModelRequirementsWithCommitments`.
5
6
  *
@@ -14,4 +15,11 @@ export type CreateAgentModelRequirementsOptions = {
14
15
  * Optional hook used to upload inline knowledge files before finalizing the requirements.
15
16
  */
16
17
  readonly inlineKnowledgeSourceUploader?: InlineKnowledgeSourceUploader;
18
+ /**
19
+ * Optional resolver that provides actual agent names and descriptions for teammate URLs.
20
+ *
21
+ * When provided, TEAM tools are created with the agent's real human-readable name and
22
+ * persona description rather than technical IDs derived from URL path segments.
23
+ */
24
+ readonly teammateProfileResolver?: TeammateProfileResolver;
17
25
  };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Profile data for a teammate agent resolved from its source or backend.
3
+ *
4
+ * @private internal type for TEAM commitment profile enrichment
5
+ */
6
+ export type TeammateProfile = {
7
+ /**
8
+ * The human-readable name of the agent.
9
+ */
10
+ readonly agentName: string;
11
+ /**
12
+ * Short description of what the agent does, from its PERSONA commitment.
13
+ */
14
+ readonly personaDescription: string | null;
15
+ };
16
+ /**
17
+ * Resolves profile data for teammate agents referenced in TEAM commitments.
18
+ *
19
+ * Implementations are expected to return the actual human-readable name and
20
+ * description of each teammate agent identified by URL, so TEAM tools can be
21
+ * created with meaningful labels and descriptions rather than technical IDs.
22
+ *
23
+ * @private internal type for TEAM commitment profile enrichment
24
+ */
25
+ export type TeammateProfileResolver = {
26
+ /**
27
+ * Returns profile data for the given teammate agent URL.
28
+ *
29
+ * @param url - Canonical teammate URL from the resolved TEAM commitment content.
30
+ * @returns Teammate profile or `null` when the URL cannot be resolved locally.
31
+ */
32
+ resolveTeammateProfile(url: string): Promise<TeammateProfile | null>;
33
+ };
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Builds a deterministic TEAM tool name from teammate identity.
2
+ * Builds a deterministic TEAM tool name from the teammate label.
3
3
  *
4
- * The readable part is based on teammate label while the hash suffix
5
- * keeps uniqueness and stable mapping for the underlying teammate URL.
4
+ * The tool name is derived solely from the human-readable label so that it
5
+ * remains stable and predictable regardless of internal technical identifiers.
6
6
  *
7
- * @param teammateUrl - Canonical teammate URL used at runtime.
8
- * @param teammateLabel - Human-readable teammate label.
9
- * @returns Deterministic TEAM tool name.
7
+ * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
8
+ * @param teammateLabel - Human-readable teammate label used as the basis for the name.
9
+ * @returns TEAM tool name derived from the label.
10
10
  * @private internal utility of TEAM commitments and chat UI mapping
11
11
  */
12
- export declare function createTeamToolName(teammateUrl: string, teammateLabel?: string): string;
12
+ export declare function createTeamToolName(_teammateUrl: string, teammateLabel?: string): string;
@@ -3,6 +3,7 @@ import type { Promisable } from 'type-fest';
3
3
  import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
4
4
  import type { ChatMessage } from '../types/ChatMessage';
5
5
  import type { ChatParticipant } from '../types/ChatParticipant';
6
+ import type { ChatUiTranslations } from './ChatProps';
6
7
  /**
7
8
  * Props for the Chat actions toolbar.
8
9
  *
@@ -25,6 +26,10 @@ export type ChatActionsBarProps = {
25
26
  * Disables action interactions while scroll is active.
26
27
  */
27
28
  shouldDisableActions: boolean;
29
+ /**
30
+ * Optional localized labels for Chat UI strings such as button labels.
31
+ */
32
+ chatUiTranslations?: ChatUiTranslations;
28
33
  onButtonClick: (handler?: (event: MouseEvent<HTMLButtonElement>) => void) => (event: MouseEvent<HTMLButtonElement>) => void;
29
34
  };
30
35
  /**
@@ -9,7 +9,7 @@ import type { ChatProps } from './ChatProps';
9
9
  *
10
10
  * @private props for internal subcomponent
11
11
  */
12
- type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'participants'> & {
12
+ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'onQuickMessageButton' | 'participants'> & {
13
13
  message: ChatMessage;
14
14
  participant: ChatParticipant | undefined;
15
15
  isLastMessage: boolean;
@@ -34,6 +34,14 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'pa
34
34
  * Optional localized labels used by feedback controls.
35
35
  */
36
36
  feedbackTranslations?: ChatProps['feedbackTranslations'];
37
+ /**
38
+ * Optional localized labels used by timestamp metadata.
39
+ */
40
+ timingTranslations?: ChatProps['timingTranslations'];
41
+ /**
42
+ * Optional moment locale used to format message timestamps.
43
+ */
44
+ chatLocale?: ChatProps['chatLocale'];
37
45
  /**
38
46
  * Called when the copy button is pressed.
39
47
  */
@@ -56,6 +64,10 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'pa
56
64
  * Optional cached metadata keyed by TEAM tool names to enrich tool call chips.
57
65
  */
58
66
  teamAgentProfiles?: ChatProps['teamAgentProfiles'];
67
+ /**
68
+ * Controls whether assistant replies render as bubbles or article blocks.
69
+ */
70
+ CHAT_VISUAL_MODE?: ChatProps['CHAT_VISUAL_MODE'];
59
71
  /**
60
72
  * Called when a tool call chiplet is clicked.
61
73
  */
@@ -73,6 +85,10 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'pa
73
85
  */
74
86
  isSpeechPlaybackEnabled?: ChatProps['isSpeechPlaybackEnabled'];
75
87
  readonly elevenLabsVoiceId?: ChatProps['elevenLabsVoiceId'];
88
+ /**
89
+ * Optional localized labels for Chat UI elements such as lifecycle badges.
90
+ */
91
+ chatUiTranslations?: ChatProps['chatUiTranslations'];
76
92
  };
77
93
  /**
78
94
  * Metadata for a teammate agent tool.
@@ -1,2 +1,2 @@
1
1
  /** @jest-environment jsdom */
2
- export {};
2
+ import 'moment/locale/cs';
@@ -28,18 +28,32 @@ export type ChatMessageListProps = {
28
28
  * Optional localized labels used by feedback controls.
29
29
  */
30
30
  feedbackTranslations?: ChatProps['feedbackTranslations'];
31
+ /**
32
+ * Optional localized labels used by timestamp metadata.
33
+ */
34
+ timingTranslations?: ChatProps['timingTranslations'];
35
+ /**
36
+ * Optional moment locale used to format message timestamps.
37
+ */
38
+ chatLocale?: ChatProps['chatLocale'];
31
39
  onCopy?: () => void;
32
40
  onMessage?: (messageContent: string) => Promisable<void>;
33
41
  onActionButton?: ChatProps['onActionButton'];
42
+ onQuickMessageButton?: ChatProps['onQuickMessageButton'];
34
43
  onCreateAgent?: (bookContent: string) => void;
35
44
  toolTitles?: Record<string, string>;
36
45
  teammates?: ChatProps['teammates'];
37
46
  teamAgentProfiles?: ChatProps['teamAgentProfiles'];
47
+ CHAT_VISUAL_MODE?: ChatProps['CHAT_VISUAL_MODE'];
38
48
  onToolCallClick?: (toolCall: NonNullable<ChatMessage['toolCalls']>[number]) => void;
39
49
  onCitationClick?: (citation: ParsedCitation) => void;
40
50
  soundSystem?: ChatProps['soundSystem'];
41
51
  isSpeechPlaybackEnabled?: ChatProps['isSpeechPlaybackEnabled'];
42
52
  elevenLabsVoiceId?: ChatProps['elevenLabsVoiceId'];
53
+ /**
54
+ * Optional localized labels for Chat UI elements such as lifecycle badges.
55
+ */
56
+ chatUiTranslations?: ChatProps['chatUiTranslations'];
43
57
  setChatMessagesElement: (element: HTMLDivElement | null) => void;
44
58
  onScroll: (event: UIEvent<HTMLDivElement>) => void;
45
59
  chatMessagesClassName?: string;