@promptbook/utils 0.112.0-99 → 0.112.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/README.md +37 -21
- package/esm/index.es.js +9 -11
- package/esm/index.es.js.map +1 -1
- package/esm/src/_packages/components.index.d.ts +4 -0
- package/esm/src/_packages/core.index.d.ts +0 -2
- package/esm/src/_packages/node.index.d.ts +40 -0
- package/esm/src/_packages/types.index.d.ts +18 -0
- package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
- package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
- package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
- package/esm/src/book-3.0/CliAgent.d.ts +66 -0
- package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
- package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
- package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
- package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
- package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
- package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
- package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
- package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
- package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
- package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
- package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
- package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
- package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
- package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
- package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
- package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
- package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
- package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
- package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
- package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
- package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
- package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
- package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
- package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
- package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
- package/esm/src/cli/cli-commands/agent.d.ts +14 -0
- package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
- package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
- package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
- package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
- package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
- package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
- package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
- package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
- package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
- package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
- package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -2
- package/umd/index.umd.js +13 -13
- package/umd/index.umd.js.map +1 -1
- package/umd/src/_packages/components.index.d.ts +4 -0
- package/umd/src/_packages/core.index.d.ts +0 -2
- package/umd/src/_packages/node.index.d.ts +40 -0
- package/umd/src/_packages/types.index.d.ts +18 -0
- package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
- package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
- package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
- package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
- package/umd/src/book-3.0/CliAgent.d.ts +66 -0
- package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
- package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
- package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
- package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
- package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
- package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
- package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
- package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
- package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
- package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +1 -0
- package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
- package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
- package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
- package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
- package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
- package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
- package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
- package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
- package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
- package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
- package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
- package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
- package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
- package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
- package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
- package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
- package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
- package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
- package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
- package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
- package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
- package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
- package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
- package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
- package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
- package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
- package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
- package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
- package/umd/src/cli/cli-commands/agent.d.ts +14 -0
- package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +17 -1
- package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
- package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
- package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
- package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
- package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
- package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
- package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
- package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
- package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
- package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
- package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
- package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
- package/umd/src/version.d.ts +1 -1
|
@@ -221,7 +221,6 @@ import { normalizeChatAttachments } from '../utils/chat/chatAttachments/normaliz
|
|
|
221
221
|
import { resolveChatAttachmentContents } from '../utils/chat/chatAttachments/resolveChatAttachmentContents';
|
|
222
222
|
import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
|
|
223
223
|
import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
|
|
224
|
-
import { CORE_AGENTS_SERVER } from '../../servers';
|
|
225
224
|
import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
|
|
226
225
|
import { PUBLIC_AGENTS_SERVERS } from '../../servers';
|
|
227
226
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
@@ -447,6 +446,5 @@ export { normalizeChatAttachments };
|
|
|
447
446
|
export { resolveChatAttachmentContents };
|
|
448
447
|
export { aboutPromptbookInformation };
|
|
449
448
|
export { $generateBookBoilerplate };
|
|
450
|
-
export { CORE_AGENTS_SERVER };
|
|
451
449
|
export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
|
|
452
450
|
export { PUBLIC_AGENTS_SERVERS };
|
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
+
import { AGENT_BOOK_FILE_PATH } from '../book-3.0/agentFolderPaths';
|
|
3
|
+
import { AGENT_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
4
|
+
import { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
5
|
+
import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
6
|
+
import { AGENT_FAILED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
|
|
7
|
+
import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
|
|
8
|
+
import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
|
|
9
|
+
import type { CliAgentHarness } from '../book-3.0/CliAgent';
|
|
10
|
+
import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
|
|
11
|
+
import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
|
|
12
|
+
import type { CliAgentOptions } from '../book-3.0/CliAgent';
|
|
13
|
+
import { CliAgent } from '../book-3.0/CliAgent';
|
|
14
|
+
import { CLI_AGENT_HARNESS_NAMES } from '../book-3.0/cliAgentEnv';
|
|
15
|
+
import { CLI_AGENT_THINKING_LEVEL_VALUES } from '../book-3.0/cliAgentEnv';
|
|
16
|
+
import { PTBK_HARNESS_ENV } from '../book-3.0/cliAgentEnv';
|
|
17
|
+
import { PTBK_MODEL_ENV } from '../book-3.0/cliAgentEnv';
|
|
18
|
+
import { PTBK_THINKING_LEVEL_ENV } from '../book-3.0/cliAgentEnv';
|
|
19
|
+
import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
|
|
20
|
+
import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
|
|
21
|
+
import { LiteAgent } from '../book-3.0/LiteAgent';
|
|
2
22
|
import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
|
|
3
23
|
import { getAllCommitmentsToolFunctionsForNode } from '../commitments/_common/getAllCommitmentsToolFunctionsForNode';
|
|
4
24
|
import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
|
|
@@ -12,6 +32,26 @@ import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage
|
|
|
12
32
|
import { $execCommand } from '../utils/execCommand/$execCommand';
|
|
13
33
|
import { $execCommands } from '../utils/execCommand/$execCommands';
|
|
14
34
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
35
|
+
export { AGENT_BOOK_FILE_PATH };
|
|
36
|
+
export { AGENT_MESSAGES_DIRECTORY_PATH };
|
|
37
|
+
export { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH };
|
|
38
|
+
export { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH };
|
|
39
|
+
export { AGENT_FAILED_MESSAGES_DIRECTORY_PATH };
|
|
40
|
+
export type { BookNodeAgentSource };
|
|
41
|
+
export type { BookNodeAgentSourceOptions };
|
|
42
|
+
export type { CliAgentHarness };
|
|
43
|
+
export type { CliAgentThinkingLevel };
|
|
44
|
+
export type { CliAgentRunOptions };
|
|
45
|
+
export type { CliAgentOptions };
|
|
46
|
+
export { CliAgent };
|
|
47
|
+
export { CLI_AGENT_HARNESS_NAMES };
|
|
48
|
+
export { CLI_AGENT_THINKING_LEVEL_VALUES };
|
|
49
|
+
export { PTBK_HARNESS_ENV };
|
|
50
|
+
export { PTBK_MODEL_ENV };
|
|
51
|
+
export { PTBK_THINKING_LEVEL_ENV };
|
|
52
|
+
export type { LiteAgentOptions };
|
|
53
|
+
export type { LiteAgentRunOptions };
|
|
54
|
+
export { LiteAgent };
|
|
15
55
|
export { createPipelineCollectionFromDirectory };
|
|
16
56
|
export { getAllCommitmentsToolFunctionsForNode };
|
|
17
57
|
export { $provideExecutablesForNode };
|
|
@@ -4,6 +4,14 @@ import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicI
|
|
|
4
4
|
import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
|
|
5
5
|
import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
|
|
6
6
|
import type { string_book } from '../book-2.0/agent-source/string_book';
|
|
7
|
+
import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
|
|
8
|
+
import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
|
|
9
|
+
import type { CliAgentHarness } from '../book-3.0/CliAgent';
|
|
10
|
+
import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
|
|
11
|
+
import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
|
|
12
|
+
import type { CliAgentOptions } from '../book-3.0/CliAgent';
|
|
13
|
+
import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
|
|
14
|
+
import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
|
|
7
15
|
import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
|
|
8
16
|
import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
|
|
9
17
|
import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
|
|
@@ -47,6 +55,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
|
|
|
47
55
|
import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
|
|
48
56
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
49
57
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
58
|
+
import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
|
|
50
59
|
import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
|
|
51
60
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
52
61
|
import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing/TeamToolResult';
|
|
@@ -437,6 +446,14 @@ export type { AgentBasicInformation };
|
|
|
437
446
|
export type { AgentModelRequirements };
|
|
438
447
|
export type { CreateAgentModelRequirementsOptions };
|
|
439
448
|
export type { string_book };
|
|
449
|
+
export type { BookNodeAgentSource };
|
|
450
|
+
export type { BookNodeAgentSourceOptions };
|
|
451
|
+
export type { CliAgentHarness };
|
|
452
|
+
export type { CliAgentThinkingLevel };
|
|
453
|
+
export type { CliAgentRunOptions };
|
|
454
|
+
export type { CliAgentOptions };
|
|
455
|
+
export type { LiteAgentOptions };
|
|
456
|
+
export type { LiteAgentRunOptions };
|
|
440
457
|
export type { AvatarChipProps };
|
|
441
458
|
export type { AvatarChipFromSourceProps };
|
|
442
459
|
export type { AvatarProfileProps };
|
|
@@ -480,6 +497,7 @@ export type { ChatProgressCard };
|
|
|
480
497
|
export type { ChatMessageReplyingTo };
|
|
481
498
|
export type { ChatMessage };
|
|
482
499
|
export type { ChatParticipant };
|
|
500
|
+
export type { CitationLabelResolver };
|
|
483
501
|
export type { ParsedCitation };
|
|
484
502
|
export type { MessageButton };
|
|
485
503
|
export type { TeamToolResult };
|
|
@@ -7,6 +7,10 @@ type AvatarAnimationListener = (now: number) => void;
|
|
|
7
7
|
/**
|
|
8
8
|
* Registers one avatar animation callback in the shared animation loop.
|
|
9
9
|
*
|
|
10
|
+
* Each listener is staggered at registration time so it does not fire on the same animation
|
|
11
|
+
* frame as the existing listeners, and the shared loop further caps how many listeners run
|
|
12
|
+
* per frame, keeping the main thread responsive when many avatars are mounted.
|
|
13
|
+
*
|
|
10
14
|
* @param avatarAnimationListener Frame callback invoked on every animation frame.
|
|
11
15
|
* @returns Cleanup function that unregisters the callback.
|
|
12
16
|
*
|
|
@@ -7,7 +7,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
|
|
|
7
7
|
*
|
|
8
8
|
* @private shared contract for the avatar rendering system
|
|
9
9
|
*/
|
|
10
|
-
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
|
|
10
|
+
export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'octopus3d3' | 'octopus3d4' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
|
|
11
11
|
/**
|
|
12
12
|
* Derived color palette used by avatar visuals.
|
|
13
13
|
*
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { string_book } from '../book-2.0/agent-source/string_book';
|
|
2
|
+
import { Book } from './Book';
|
|
3
|
+
/**
|
|
4
|
+
* Book source value accepted by Node-backed Book agents.
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/node`
|
|
7
|
+
*/
|
|
8
|
+
export type BookNodeAgentSource = Book | string_book;
|
|
9
|
+
/**
|
|
10
|
+
* Common source options shared by Node-backed Book agents.
|
|
11
|
+
*
|
|
12
|
+
* Provide either `agentPath` or `book`.
|
|
13
|
+
*
|
|
14
|
+
* @public exported from `@promptbook/node`
|
|
15
|
+
*/
|
|
16
|
+
export type BookNodeAgentSourceOptions = {
|
|
17
|
+
readonly agentPath?: string;
|
|
18
|
+
readonly book?: string | BookNodeAgentSource;
|
|
19
|
+
readonly currentWorkingDirectory?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Normalized source snapshot used internally by Node-backed Book agents.
|
|
23
|
+
*
|
|
24
|
+
* @private internal utility of `CliAgent` and `LiteAgent`
|
|
25
|
+
*/
|
|
26
|
+
export type ResolvedBookNodeAgentSource = {
|
|
27
|
+
readonly agentName: string;
|
|
28
|
+
readonly agentPath: string | null;
|
|
29
|
+
readonly agentSource: string_book;
|
|
30
|
+
readonly currentWorkingDirectory: string;
|
|
31
|
+
readonly sourceDirectoryPath: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Resolves shared Node-backed Book source options into one normalized source snapshot.
|
|
35
|
+
*
|
|
36
|
+
* @private internal utility of `CliAgent` and `LiteAgent`
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveBookNodeAgentSource(options: BookNodeAgentSourceOptions): Promise<ResolvedBookNodeAgentSource>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
|
|
2
|
+
import { CLI_AGENT_HARNESS_NAMES, CLI_AGENT_THINKING_LEVEL_VALUES } from './cliAgentEnv';
|
|
3
|
+
/**
|
|
4
|
+
* CLI harness names supported by `ptbk agent exec`.
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/node`
|
|
7
|
+
*/
|
|
8
|
+
export type CliAgentHarness = (typeof CLI_AGENT_HARNESS_NAMES)[number];
|
|
9
|
+
/**
|
|
10
|
+
* Thinking levels supported by CLI coding harnesses.
|
|
11
|
+
*
|
|
12
|
+
* @public exported from `@promptbook/node`
|
|
13
|
+
*/
|
|
14
|
+
export type CliAgentThinkingLevel = (typeof CLI_AGENT_THINKING_LEVEL_VALUES)[number];
|
|
15
|
+
/**
|
|
16
|
+
* Per-run CLI options exposed by `CliAgent`.
|
|
17
|
+
*
|
|
18
|
+
* `noUi` defaults to `true` so command output stays suitable for JavaScript callers.
|
|
19
|
+
*
|
|
20
|
+
* @public exported from `@promptbook/node`
|
|
21
|
+
*/
|
|
22
|
+
export type CliAgentRunOptions = {
|
|
23
|
+
readonly allowCredits?: boolean;
|
|
24
|
+
readonly context?: string;
|
|
25
|
+
readonly harness?: CliAgentHarness;
|
|
26
|
+
readonly isVerbose?: boolean;
|
|
27
|
+
readonly model?: string;
|
|
28
|
+
readonly noUi?: boolean;
|
|
29
|
+
readonly thinkingLevel?: CliAgentThinkingLevel;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Constructor options for `CliAgent`.
|
|
33
|
+
*
|
|
34
|
+
* @public exported from `@promptbook/node`
|
|
35
|
+
*/
|
|
36
|
+
export type CliAgentOptions = BookNodeAgentSourceOptions & CliAgentRunOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Lightweight JavaScript wrapper around the Promptbook agent execution pipeline.
|
|
39
|
+
*
|
|
40
|
+
* It uses the same harnesses and execution path as `ptbk agent exec`, running the runner
|
|
41
|
+
* in-process instead of spawning a separate CLI process.
|
|
42
|
+
*
|
|
43
|
+
* When no `harness` is provided in the constructor or per-run options, `CliAgent` falls back
|
|
44
|
+
* to the `PTBK_HARNESS` environment variable, mirroring `ptbk agent exec` behavior.
|
|
45
|
+
*
|
|
46
|
+
* @public exported from `@promptbook/node`
|
|
47
|
+
*/
|
|
48
|
+
export declare class CliAgent {
|
|
49
|
+
private readonly options;
|
|
50
|
+
private temporaryAgentPath;
|
|
51
|
+
constructor(options: CliAgentOptions);
|
|
52
|
+
/**
|
|
53
|
+
* Runs one non-interactive agent turn through the selected harness.
|
|
54
|
+
*
|
|
55
|
+
* @param message - User message sent to the agent.
|
|
56
|
+
* @param options - Optional per-run overrides.
|
|
57
|
+
* @returns Final agent answer.
|
|
58
|
+
*/
|
|
59
|
+
run(message: string, options?: CliAgentRunOptions): Promise<string>;
|
|
60
|
+
/**
|
|
61
|
+
* Resolves the agent path passed to the runner, materializing one temporary `.book` file when needed.
|
|
62
|
+
*
|
|
63
|
+
* @private internal utility of `CliAgent`
|
|
64
|
+
*/
|
|
65
|
+
private resolveExecutableAgentPath;
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
|
|
2
|
+
import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools';
|
|
3
|
+
import type { string_model_name } from '../types/string_model_name';
|
|
4
|
+
import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
|
|
5
|
+
/**
|
|
6
|
+
* Options for constructing one `LiteAgent`.
|
|
7
|
+
*
|
|
8
|
+
* `LiteAgent` is intentionally smaller than the CLI harnesses. It runs the Book through the
|
|
9
|
+
* OpenAI Agents SDK directly, while keeping Promptbook tool definitions and hosted knowledge
|
|
10
|
+
* whenever those features fit inside the lighter runtime.
|
|
11
|
+
*
|
|
12
|
+
* @public exported from `@promptbook/node`
|
|
13
|
+
*/
|
|
14
|
+
export type LiteAgentOptions = BookNodeAgentSourceOptions & {
|
|
15
|
+
readonly apiKey?: string;
|
|
16
|
+
readonly baseURL?: string;
|
|
17
|
+
readonly createAgentModelRequirementsOptions?: CreateAgentModelRequirementsOptions;
|
|
18
|
+
readonly isVerbose?: boolean;
|
|
19
|
+
readonly maxRequestsPerMinute?: number;
|
|
20
|
+
readonly modelName?: string_model_name;
|
|
21
|
+
readonly organization?: string;
|
|
22
|
+
readonly project?: string;
|
|
23
|
+
readonly scriptExecutionTools?: ScriptExecutionTools | ReadonlyArray<ScriptExecutionTools>;
|
|
24
|
+
readonly userId?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Per-run options for `LiteAgent`.
|
|
28
|
+
*
|
|
29
|
+
* @public exported from `@promptbook/node`
|
|
30
|
+
*/
|
|
31
|
+
export type LiteAgentRunOptions = {
|
|
32
|
+
readonly context?: string;
|
|
33
|
+
readonly signal?: AbortSignal;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Lightweight Node.js wrapper around the OpenAI Agents SDK for Promptbook Books.
|
|
37
|
+
*
|
|
38
|
+
* This path is intentionally simpler than `ptbk agent exec`: it prepares one SDK agent in-process
|
|
39
|
+
* and reuses it across calls, which keeps JavaScript integration small while still honoring the
|
|
40
|
+
* compiled Promptbook system message, prompt suffix, tools, and hosted knowledge when supported.
|
|
41
|
+
*
|
|
42
|
+
* @public exported from `@promptbook/node`
|
|
43
|
+
*/
|
|
44
|
+
export declare class LiteAgent {
|
|
45
|
+
private readonly options;
|
|
46
|
+
private preparedAgentPromise;
|
|
47
|
+
constructor(options: LiteAgentOptions);
|
|
48
|
+
/**
|
|
49
|
+
* Runs one user message through the prepared OpenAI Agents SDK agent.
|
|
50
|
+
*
|
|
51
|
+
* @param message - User message sent to the agent.
|
|
52
|
+
* @param options - Optional context and cancellation signal.
|
|
53
|
+
* @returns Final text returned by the SDK agent.
|
|
54
|
+
*/
|
|
55
|
+
run(message: string, options?: LiteAgentRunOptions): Promise<string>;
|
|
56
|
+
/**
|
|
57
|
+
* Lazily prepares and caches the underlying OpenAI Agents SDK runtime.
|
|
58
|
+
*
|
|
59
|
+
* @private internal utility of `LiteAgent`
|
|
60
|
+
*/
|
|
61
|
+
private prepareAgent;
|
|
62
|
+
/**
|
|
63
|
+
* Builds the in-process OpenAI Agents SDK runtime from the Book source.
|
|
64
|
+
*
|
|
65
|
+
* @private internal utility of `LiteAgent`
|
|
66
|
+
*/
|
|
67
|
+
private createPreparedAgent;
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relative path to the local agent source used by the agent folder convention.
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/node`
|
|
5
|
+
*/
|
|
6
|
+
export declare const AGENT_BOOK_FILE_PATH = "agent.book";
|
|
7
|
+
/**
|
|
8
|
+
* Relative path to the message queue root used by the agent folder convention.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/node`
|
|
11
|
+
*/
|
|
12
|
+
export declare const AGENT_MESSAGES_DIRECTORY_PATH = "messages";
|
|
13
|
+
/**
|
|
14
|
+
* Relative path to queued user messages consumed by the agent runner.
|
|
15
|
+
*
|
|
16
|
+
* @public exported from `@promptbook/node`
|
|
17
|
+
*/
|
|
18
|
+
export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
|
|
19
|
+
/**
|
|
20
|
+
* Relative path to answered messages written by the agent runner.
|
|
21
|
+
*
|
|
22
|
+
* @public exported from `@promptbook/node`
|
|
23
|
+
*/
|
|
24
|
+
export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
|
|
25
|
+
/**
|
|
26
|
+
* Relative path to messages that the agent runner stopped retrying.
|
|
27
|
+
*
|
|
28
|
+
* @public exported from `@promptbook/node`
|
|
29
|
+
*/
|
|
30
|
+
export declare const AGENT_FAILED_MESSAGES_DIRECTORY_PATH: string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All CLI harness names supported by `CliAgent` and `ptbk agent exec`.
|
|
3
|
+
*
|
|
4
|
+
* @public exported from `@promptbook/node`
|
|
5
|
+
*/
|
|
6
|
+
export declare const CLI_AGENT_HARNESS_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini"];
|
|
7
|
+
/**
|
|
8
|
+
* All supported thinking-level values for CLI coding-agent runners.
|
|
9
|
+
*
|
|
10
|
+
* @public exported from `@promptbook/node`
|
|
11
|
+
*/
|
|
12
|
+
export declare const CLI_AGENT_THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
13
|
+
/**
|
|
14
|
+
* Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
|
|
15
|
+
*
|
|
16
|
+
* Set this to one of the harness names (`openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`)
|
|
17
|
+
* so that `CliAgent` and `ptbk agent exec` can run without an explicit `harness` option.
|
|
18
|
+
*
|
|
19
|
+
* @public exported from `@promptbook/node`
|
|
20
|
+
*/
|
|
21
|
+
export declare const PTBK_HARNESS_ENV = "PTBK_HARNESS";
|
|
22
|
+
/**
|
|
23
|
+
* Environment variable used as the default runner model when `--model` is omitted or not set in `CliAgent`.
|
|
24
|
+
*
|
|
25
|
+
* @public exported from `@promptbook/node`
|
|
26
|
+
*/
|
|
27
|
+
export declare const PTBK_MODEL_ENV = "PTBK_MODEL";
|
|
28
|
+
/**
|
|
29
|
+
* Environment variable used as the default thinking level when `--thinking-level` is omitted or not set in `CliAgent`.
|
|
30
|
+
*
|
|
31
|
+
* @public exported from `@promptbook/node`
|
|
32
|
+
*/
|
|
33
|
+
export declare const PTBK_THINKING_LEVEL_ENV = "PTBK_THINKING_LEVEL";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
2
|
import type { Promisable } from 'type-fest';
|
|
3
3
|
import type { string_book } from '../../book-2.0/agent-source/string_book';
|
|
4
4
|
import type { number_percent } from '../../types/number_percent';
|
|
@@ -6,6 +6,7 @@ import type { number_positive } from '../../types/number_positive';
|
|
|
6
6
|
import type { string_knowledge_source_content } from '../../types/string_knowledge_source_content';
|
|
7
7
|
import type { string_css_value } from '../../types/string_markdown';
|
|
8
8
|
import type { HoistedMenuItem } from '../_common/MenuHoisting/MenuHoistingContext';
|
|
9
|
+
import type { BookEditorTheme } from './BookEditorTheme';
|
|
9
10
|
/**
|
|
10
11
|
* Monaco diagnostic shown inside `BookEditor`.
|
|
11
12
|
*
|
|
@@ -94,14 +95,14 @@ export type BookEditorProps = {
|
|
|
94
95
|
*/
|
|
95
96
|
readonly style?: CSSProperties;
|
|
96
97
|
/**
|
|
97
|
-
* Resolved
|
|
98
|
+
* Resolved host application theme.
|
|
98
99
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
100
|
+
* `<BookEditor/>` accepts this for integration compatibility, but the notebook
|
|
101
|
+
* editor itself is intentionally rendered as light paper in every app theme.
|
|
101
102
|
*
|
|
102
103
|
* @default 'LIGHT'
|
|
103
104
|
*/
|
|
104
|
-
readonly theme?:
|
|
105
|
+
readonly theme?: BookEditorTheme;
|
|
105
106
|
/**
|
|
106
107
|
* Height of the `BookEditor` component
|
|
107
108
|
*
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AboutPromptbookInformationOptions } from '../../utils/misc/aboutPromptbookInformation';
|
|
2
|
+
/**
|
|
3
|
+
* Browser-safe Promptbook information used by `BookEditor`.
|
|
4
|
+
*
|
|
5
|
+
* The shared `AboutPromptbookInformation` component renders markdown through the
|
|
6
|
+
* chat markdown pipeline, which has a server-side JSDOM sanitizer path. Keeping
|
|
7
|
+
* this component plain JSX prevents BookEditor from pulling JSDOM into client
|
|
8
|
+
* bundles.
|
|
9
|
+
*
|
|
10
|
+
* @private Internal component used by `BookEditorActionbar`
|
|
11
|
+
*/
|
|
12
|
+
export declare function BookEditorAboutPromptbookInformation(props?: AboutPromptbookInformationOptions): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,7 @@ type AgentReferenceMatch = {
|
|
|
15
15
|
* @private function of BookEditorMonaco
|
|
16
16
|
*/
|
|
17
17
|
export declare const BookEditorMonacoTokenization: {
|
|
18
|
+
DYNAMIC_COMMITMENT_REGEX: RegExp;
|
|
18
19
|
AGENT_URL_REFERENCE_REGEX: RegExp;
|
|
19
20
|
AGENT_REFERENCE_TOKEN_REGEX: RegExp;
|
|
20
21
|
AGENT_REFERENCE_BRACED_REGEX: RegExp;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visual theme accepted by `<BookEditor/>` integrations.
|
|
3
|
+
*
|
|
4
|
+
* @private internal type of `BookEditor`
|
|
5
|
+
*/
|
|
6
|
+
export type BookEditorTheme = 'LIGHT' | 'DARK';
|
|
7
|
+
/**
|
|
8
|
+
* Theme used for the actual notebook editor surface.
|
|
9
|
+
*
|
|
10
|
+
* The host application can still pass its resolved app theme, but book sources
|
|
11
|
+
* are intentionally rendered as light paper in both light and dark app modes.
|
|
12
|
+
*
|
|
13
|
+
* @private internal constant of `BookEditor`
|
|
14
|
+
*/
|
|
15
|
+
export declare const BOOK_EDITOR_RENDER_THEME = "LIGHT";
|
|
16
|
+
/**
|
|
17
|
+
* Resolves an app-level theme into the visual theme used by `<BookEditor/>`.
|
|
18
|
+
*
|
|
19
|
+
* @param hostTheme - Resolved theme from the embedding application.
|
|
20
|
+
* @returns Light theme used by the Book editor surface.
|
|
21
|
+
*
|
|
22
|
+
* @private internal utility of `BookEditor`
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveBookEditorRenderTheme(hostTheme?: BookEditorTheme): BookEditorTheme;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-compatible stub for `createDeprecatedCommitmentDiagnostics`.
|
|
3
|
+
*
|
|
4
|
+
* In the browser build the full Node.js implementation is not available,
|
|
5
|
+
* so this stub always returns an empty array to keep the editor functional.
|
|
6
|
+
*
|
|
7
|
+
* @private internal utility of `BookEditorMonaco`
|
|
8
|
+
*/
|
|
9
|
+
export declare function createDeprecatedCommitmentDiagnostics(_agentSource?: string): [];
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { editor } from 'monaco-editor';
|
|
2
|
+
import type { BookEditorTheme } from './BookEditorTheme';
|
|
2
3
|
/**
|
|
3
4
|
* Type describing monaco editor.
|
|
4
5
|
*/
|
|
5
6
|
type MonacoEditor = typeof import('monaco-editor');
|
|
6
|
-
/**
|
|
7
|
-
* Resolved visual theme supported by the Book editor.
|
|
8
|
-
*
|
|
9
|
-
* @private function of BookEditorMonaco
|
|
10
|
-
*/
|
|
11
|
-
type BookEditorTheme = 'LIGHT' | 'DARK';
|
|
12
7
|
/**
|
|
13
8
|
* Props for use book editor monaco language.
|
|
14
9
|
*/
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { editor } from 'monaco-editor';
|
|
2
|
+
import type { BookEditorTheme } from './BookEditorTheme';
|
|
2
3
|
/**
|
|
3
4
|
* Type describing monaco editor.
|
|
4
5
|
*/
|
|
5
6
|
type MonacoEditor = typeof import('monaco-editor');
|
|
6
|
-
/**
|
|
7
|
-
* Resolved visual theme supported by the Book editor.
|
|
8
|
-
*/
|
|
9
|
-
type BookEditorTheme = 'LIGHT' | 'DARK';
|
|
10
7
|
/**
|
|
11
8
|
* Props for use book editor monaco lifecycle.
|
|
12
9
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BookEditorTheme } from './BookEditorTheme';
|
|
1
2
|
/**
|
|
2
3
|
* Props for use book editor monaco styles.
|
|
3
4
|
*/
|
|
@@ -7,7 +8,7 @@ type UseBookEditorMonacoStylesProps = {
|
|
|
7
8
|
readonly scaledContentPaddingLeft: number;
|
|
8
9
|
readonly scaledVerticalLineLeft: number;
|
|
9
10
|
readonly zoomLevel: number;
|
|
10
|
-
readonly theme:
|
|
11
|
+
readonly theme: BookEditorTheme;
|
|
11
12
|
};
|
|
12
13
|
/**
|
|
13
14
|
* Injects notebook-inspired styling that is unique per `BookEditorMonaco` instance.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
|
2
|
+
import type { CitationLabelResolver } from '../types/CitationLabelResolver';
|
|
2
3
|
import type { ParsedCitation } from '../utils/parseCitationsFromContent';
|
|
3
4
|
import type { ChatSoundSystem } from './ChatProps';
|
|
4
5
|
/**
|
|
@@ -10,6 +11,7 @@ export type ChatCitationModalProps = {
|
|
|
10
11
|
isOpen: boolean;
|
|
11
12
|
citation: ParsedCitation | null;
|
|
12
13
|
participants: ReadonlyArray<ChatParticipant>;
|
|
14
|
+
resolveCitationLabel?: CitationLabelResolver;
|
|
13
15
|
soundSystem?: ChatSoundSystem;
|
|
14
16
|
onClose: () => void;
|
|
15
17
|
};
|
|
@@ -38,6 +38,10 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'on
|
|
|
38
38
|
* Optional localized labels used by timestamp metadata.
|
|
39
39
|
*/
|
|
40
40
|
timingTranslations?: ChatProps['timingTranslations'];
|
|
41
|
+
/**
|
|
42
|
+
* Optional resolver for turning technical citation sources into page/document titles.
|
|
43
|
+
*/
|
|
44
|
+
resolveCitationLabel?: ChatProps['resolveCitationLabel'];
|
|
41
45
|
/**
|
|
42
46
|
* Optional moment locale used to format message timestamps.
|
|
43
47
|
*/
|
|
@@ -32,6 +32,10 @@ export type ChatMessageListProps = {
|
|
|
32
32
|
* Optional localized labels used by timestamp metadata.
|
|
33
33
|
*/
|
|
34
34
|
timingTranslations?: ChatProps['timingTranslations'];
|
|
35
|
+
/**
|
|
36
|
+
* Optional resolver for turning technical citation sources into page/document titles.
|
|
37
|
+
*/
|
|
38
|
+
resolveCitationLabel?: ChatProps['resolveCitationLabel'];
|
|
35
39
|
/**
|
|
36
40
|
* Optional moment locale used to format message timestamps.
|
|
37
41
|
*/
|
|
@@ -8,6 +8,7 @@ import type { AgentChipData } from '../AgentChip/AgentChip';
|
|
|
8
8
|
import type { string_chat_format_name } from '../save/_common/string_chat_format_name';
|
|
9
9
|
import type { ChatMessage } from '../types/ChatMessage';
|
|
10
10
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
|
11
|
+
import type { CitationLabelResolver } from '../types/CitationLabelResolver';
|
|
11
12
|
import type { ChatSaveFormatHandlerMap } from '../save/_common/ChatSaveFormatHandler';
|
|
12
13
|
/**
|
|
13
14
|
* Response data returned by the optional `onFeedback` handler.
|
|
@@ -715,6 +716,10 @@ export type ChatProps = {
|
|
|
715
716
|
* Optional localized labels used by timestamp metadata shown under messages.
|
|
716
717
|
*/
|
|
717
718
|
readonly timingTranslations?: ChatTimingTranslations;
|
|
719
|
+
/**
|
|
720
|
+
* Optional resolver for turning technical citation sources into page/document titles.
|
|
721
|
+
*/
|
|
722
|
+
readonly resolveCitationLabel?: CitationLabelResolver;
|
|
718
723
|
/**
|
|
719
724
|
* Optional localized labels for general Chat UI elements such as button labels,
|
|
720
725
|
* lifecycle state badges, tool call modal strings, and the default input placeholder.
|
|
@@ -3,6 +3,7 @@ import type { WithTake } from '../../../utils/take/interfaces/ITakeChain';
|
|
|
3
3
|
import type { AgentChipData } from '../AgentChip/AgentChip';
|
|
4
4
|
import type { ChatMessage } from '../types/ChatMessage';
|
|
5
5
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
|
6
|
+
import type { CitationLabelResolver } from '../types/CitationLabelResolver';
|
|
6
7
|
/**
|
|
7
8
|
* Props for the tool call details modal.
|
|
8
9
|
*
|
|
@@ -20,6 +21,7 @@ export type ChatToolCallModalProps = {
|
|
|
20
21
|
toolCallIdentity?: string | null;
|
|
21
22
|
onClose: () => void;
|
|
22
23
|
toolTitles?: Record<string, string>;
|
|
24
|
+
resolveCitationLabel?: CitationLabelResolver;
|
|
23
25
|
agentParticipant?: ChatParticipant;
|
|
24
26
|
buttonColor: WithTake<Color>;
|
|
25
27
|
/**
|