@promptbook/cli 0.114.0-4 β 0.114.0-6
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 +3 -3
- package/agents/default/developer.book +1 -0
- package/apps/agents-server/next.config.ts +22 -0
- package/apps/agents-server/package.json +6 -6
- package/apps/agents-server/scripts/build-agents-server.js +43 -7
- package/apps/agents-server/scripts/build-e2e.js +12 -2
- package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +30 -16
- package/apps/agents-server/scripts/kill-port.js +163 -0
- package/apps/agents-server/scripts/run-e2e-tests.js +21 -8
- package/apps/agents-server/scripts/run-npm.js +81 -5
- package/apps/agents-server/src/app/actions.ts +3 -0
- package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -18
- package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
- package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +2 -0
- package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +7 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
- package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
- package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +153 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +13 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
- package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
- package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
- package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
- package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
- package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
- package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
- package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
- package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
- package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
- package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +5 -6
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +6 -5
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +10 -14
- package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +11 -20
- package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +5 -6
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
- package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
- package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
- package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
- package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
- package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
- package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
- package/apps/agents-server/src/database/migratePrefix.ts +13 -12
- package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
- package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
- package/apps/agents-server/src/languages/ServerTranslationKeys.ts +9 -1
- package/apps/agents-server/src/languages/translations/czech.yaml +9 -1
- package/apps/agents-server/src/languages/translations/english.yaml +9 -1
- package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
- package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +9 -0
- package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
- package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
- package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
- package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +69 -0
- package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
- package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
- package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +36 -0
- package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
- package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +82 -0
- package/apps/agents-server/src/utils/agentGoalChat.ts +19 -0
- package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
- package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
- package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
- package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
- package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +10 -9
- package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
- package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
- package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
- package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
- package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
- package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
- package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts β resolveAgentProjectProfile.ts} +33 -33
- package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
- package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
- package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
- package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
- package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
- package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
- package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
- package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
- package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
- package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
- package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
- package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
- package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
- package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +37 -6
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
- package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
- package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
- package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
- package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
- package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
- package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
- package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
- package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
- package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
- package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
- package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
- package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
- package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
- package/apps/agents-server/src/utils/userChat.ts +5 -1
- package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
- package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
- package/apps/agents-server/src/utils/userChatClient.ts +9 -31
- package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +10 -2
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
- package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +53 -0
- package/esm/index.es.js +1801 -474
- package/esm/index.es.js.map +1 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +7 -1
- package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
- package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
- package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +5 -3
- package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/{umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts β esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts β esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +39 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.test.d.ts +1 -0
- package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/esm/src/utils/misc/debounce.d.ts +4 -2
- package/esm/src/utils/misc/debounce.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
- package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
- package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
- package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +4 -4
- package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
- package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
- package/src/book-3.0/AgentTeamConversationWorkspace.ts +172 -0
- package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
- package/src/book-components/Chat/Chat/Chat.module.css +1 -8
- package/src/book-components/Chat/Chat/ChatMessageMap.tsx +8 -4
- package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
- package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
- package/src/book-components/Chat/utils/renderMarkdown.ts +306 -87
- package/src/cli/cli-commands/coder/add.ts +3 -3
- package/src/cli/cli-commands/coder/boilerplateCount.ts +1 -1
- package/src/cli/cli-commands/coder/generate-boilerplates.ts +27 -27
- package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +5 -4
- package/src/cli/cli-commands/coder/init.ts +3 -3
- package/src/cli/cli-commands/coder/run.ts +10 -2
- package/src/cli/cli-commands/coder/verify.ts +29 -5
- package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +6 -2
- package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +2 -2
- package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +4 -4
- package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
- package/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.ts β npm/$askForNpmPackageInstallationApproval.ts} +3 -3
- package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
- package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
- package/src/cli/cli-commands/common/{harness/isHarnessVersionOutdated.ts β npm/isNpmPackageVersionOutdated.ts} +6 -4
- package/src/cli/cli-commands/common/projectInitialization.ts +10 -1
- package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +73 -0
- package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +94 -0
- package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +223 -0
- package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +53 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +46 -0
- package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
- package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +22 -0
- package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +47 -0
- package/src/commands/FORMAT/formatCommandParser.ts +2 -2
- package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
- package/src/other/templates/getTemplatesPipelineCollection.ts +813 -768
- package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +80 -27
- package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
- package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
- package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
- package/src/utils/misc/debounce.ts +26 -5
- package/src/version.ts +2 -2
- package/src/versions.txt +2 -0
- package/umd/index.umd.js +1800 -473
- package/umd/index.umd.js.map +1 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +7 -1
- package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
- package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
- package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
- package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
- package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
- package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
- package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
- package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
- package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +43 -0
- package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
- package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
- package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
- package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
- package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
- package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
- package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
- package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
- package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
- package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
- package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -2
- package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
- package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
- package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
- package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
- package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +5 -3
- package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
- package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
- package/{esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts β umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
- package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts β umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
- package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +39 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.test.d.ts +1 -0
- package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
- package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
- package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
- package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
- package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
- package/umd/src/utils/misc/debounce.d.ts +4 -2
- package/umd/src/utils/misc/debounce.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
- package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
- package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
- package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
- package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
- package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
- package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
- package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
- package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
- package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
- package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
- package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
- /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts β avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
- /package/esm/src/cli/cli-commands/common/{harness/isHarnessVersionOutdated.test.d.ts β npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts β esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
- /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts β esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { basename, join } from 'path';
|
|
2
|
+
import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH, AGENT_MESSAGES_DIRECTORY_PATH } from './agentFolderPaths';
|
|
3
|
+
|
|
4
|
+
// Note: [π] This file defines the shared TEAM workspace convention rather than one standalone entity.
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Relative directory for an active TEAM conversation workspace.
|
|
8
|
+
*
|
|
9
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
10
|
+
*/
|
|
11
|
+
export const AGENT_TEAM_CONVERSATIONS_DIRECTORY_PATH = join(AGENT_MESSAGES_DIRECTORY_PATH, 'team');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Relative directory where completed TEAM conversation transcripts are retained.
|
|
15
|
+
*
|
|
16
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
17
|
+
*/
|
|
18
|
+
export const AGENT_FINISHED_TEAM_CONVERSATIONS_DIRECTORY_PATH = join(AGENT_FINISHED_MESSAGES_DIRECTORY_PATH, 'team');
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Name of the JSON manifest that describes one TEAM conversation workspace.
|
|
22
|
+
*
|
|
23
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
24
|
+
*/
|
|
25
|
+
export const AGENT_TEAM_CONVERSATION_MANIFEST_FILE_NAME = 'team.json';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Name of the read-only teammate-source directory inside one TEAM workspace.
|
|
29
|
+
*
|
|
30
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
31
|
+
*/
|
|
32
|
+
export const AGENT_TEAMMATE_SOURCES_DIRECTORY_NAME = 'teammates';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* One primary agent represented in a TEAM workspace manifest.
|
|
36
|
+
*
|
|
37
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
38
|
+
*/
|
|
39
|
+
export type AgentTeamConversationPrimaryAgent = {
|
|
40
|
+
readonly permanentId: string;
|
|
41
|
+
readonly agentName: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* One local teammate made available to the coding harness for a single user turn.
|
|
46
|
+
*
|
|
47
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
48
|
+
*/
|
|
49
|
+
export type AgentTeamConversationTeammate = {
|
|
50
|
+
readonly permanentId: string;
|
|
51
|
+
readonly agentName: string;
|
|
52
|
+
readonly url: string;
|
|
53
|
+
readonly instructions: string;
|
|
54
|
+
readonly sourceFileName: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Persisted roster snapshot for the optional TEAM workspace of one queued message.
|
|
59
|
+
*
|
|
60
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
61
|
+
*/
|
|
62
|
+
export type AgentTeamConversationWorkspaceManifest = {
|
|
63
|
+
readonly version: 1;
|
|
64
|
+
readonly primaryAgent: AgentTeamConversationPrimaryAgent;
|
|
65
|
+
readonly teammates: ReadonlyArray<AgentTeamConversationTeammate>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Creates the stable directory name that belongs to one queued `.book` message.
|
|
70
|
+
*
|
|
71
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
72
|
+
*/
|
|
73
|
+
export function createAgentTeamConversationWorkspaceDirectoryName(messageFileName: string): string {
|
|
74
|
+
const rawBaseName = basename(messageFileName).replace(/\.book$/iu, '');
|
|
75
|
+
const normalizedBaseName = rawBaseName.replace(/[^A-Za-z0-9._-]+/gu, '-').replace(/^[._-]+|[._-]+$/gu, '');
|
|
76
|
+
|
|
77
|
+
return normalizedBaseName || 'message';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Creates the relative active workspace path for one queued message.
|
|
82
|
+
*
|
|
83
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
84
|
+
*/
|
|
85
|
+
export function createAgentTeamConversationWorkspacePath(messageFileName: string): string {
|
|
86
|
+
return join(
|
|
87
|
+
AGENT_TEAM_CONVERSATIONS_DIRECTORY_PATH,
|
|
88
|
+
createAgentTeamConversationWorkspaceDirectoryName(messageFileName),
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Creates the relative completed-workspace path for one queued message.
|
|
94
|
+
*
|
|
95
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
96
|
+
*/
|
|
97
|
+
export function createFinishedAgentTeamConversationWorkspacePath(messageFileName: string): string {
|
|
98
|
+
return join(
|
|
99
|
+
AGENT_FINISHED_TEAM_CONVERSATIONS_DIRECTORY_PATH,
|
|
100
|
+
createAgentTeamConversationWorkspaceDirectoryName(messageFileName),
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Creates the source-snapshot file name for one teammate.
|
|
106
|
+
*
|
|
107
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
108
|
+
*/
|
|
109
|
+
export function createAgentTeamTeammateSourceFileName(teammatePermanentId: string): string {
|
|
110
|
+
const normalizedPermanentId = teammatePermanentId
|
|
111
|
+
.trim()
|
|
112
|
+
.replace(/[^A-Za-z0-9._-]+/gu, '-')
|
|
113
|
+
.replace(/^[._-]+|[._-]+$/gu, '');
|
|
114
|
+
|
|
115
|
+
return `${normalizedPermanentId || 'teammate'}.book`;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Checks whether unknown JSON has the minimum shape required for a TEAM workspace manifest.
|
|
120
|
+
*
|
|
121
|
+
* @private internal convention shared by the Agents Server and agent-folder runner
|
|
122
|
+
*/
|
|
123
|
+
export function isAgentTeamConversationWorkspaceManifest(
|
|
124
|
+
value: unknown,
|
|
125
|
+
): value is AgentTeamConversationWorkspaceManifest {
|
|
126
|
+
if (!value || typeof value !== 'object') {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const manifest = value as Partial<AgentTeamConversationWorkspaceManifest>;
|
|
131
|
+
if (
|
|
132
|
+
manifest.version !== 1 ||
|
|
133
|
+
!isPrimaryAgent(manifest.primaryAgent) ||
|
|
134
|
+
!Array.isArray(manifest.teammates) ||
|
|
135
|
+
!manifest.teammates.every(isTeammate)
|
|
136
|
+
) {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Checks the primary-agent part of an untrusted manifest.
|
|
145
|
+
*
|
|
146
|
+
* @private internal utility of `isAgentTeamConversationWorkspaceManifest`
|
|
147
|
+
*/
|
|
148
|
+
function isPrimaryAgent(value: unknown): value is AgentTeamConversationPrimaryAgent {
|
|
149
|
+
return Boolean(
|
|
150
|
+
value &&
|
|
151
|
+
typeof value === 'object' &&
|
|
152
|
+
typeof (value as AgentTeamConversationPrimaryAgent).permanentId === 'string' &&
|
|
153
|
+
typeof (value as AgentTeamConversationPrimaryAgent).agentName === 'string',
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Checks one teammate part of an untrusted manifest.
|
|
159
|
+
*
|
|
160
|
+
* @private internal utility of `isAgentTeamConversationWorkspaceManifest`
|
|
161
|
+
*/
|
|
162
|
+
function isTeammate(value: unknown): value is AgentTeamConversationTeammate {
|
|
163
|
+
return Boolean(
|
|
164
|
+
value &&
|
|
165
|
+
typeof value === 'object' &&
|
|
166
|
+
typeof (value as AgentTeamConversationTeammate).permanentId === 'string' &&
|
|
167
|
+
typeof (value as AgentTeamConversationTeammate).agentName === 'string' &&
|
|
168
|
+
typeof (value as AgentTeamConversationTeammate).url === 'string' &&
|
|
169
|
+
typeof (value as AgentTeamConversationTeammate).instructions === 'string' &&
|
|
170
|
+
typeof (value as AgentTeamConversationTeammate).sourceFileName === 'string',
|
|
171
|
+
);
|
|
172
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { spaceTrim } from 'spacetrim';
|
|
1
2
|
import { useEffect } from 'react';
|
|
2
3
|
import { PROMPTBOOK_SYNTAX_COLORS } from '../../config';
|
|
3
4
|
import type { BookEditorTheme } from './BookEditorTheme';
|
|
@@ -48,66 +49,66 @@ export function useBookEditorMonacoStyles({
|
|
|
48
49
|
document.head.appendChild(style);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
style.innerHTML = `
|
|
52
|
+
style.innerHTML = spaceTrim(`
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
|
|
55
|
+
/* <- [π] */
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
.${instanceClass} .monaco-editor .view-lines {
|
|
58
|
+
background-image: linear-gradient(to bottom, transparent ${scaledLineHeight - 1}px, ${lineColor} ${
|
|
58
59
|
scaledLineHeight - 1
|
|
59
60
|
}px);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
61
|
+
background-size: calc(100% + ${scaledContentPaddingLeft}px) ${scaledLineHeight}px;
|
|
62
|
+
background-position-x: -${scaledContentPaddingLeft}px;
|
|
63
|
+
background-position-y: ${scaledLineHeight * BACKGROUND_POSITION_Y_MULTIPLIER}px;
|
|
64
|
+
}
|
|
65
|
+
.${instanceClass} .monaco-editor .overflow-guard::before {
|
|
66
|
+
content: '';
|
|
67
|
+
position: absolute;
|
|
68
|
+
left: ${scaledVerticalLineLeft}px;
|
|
69
|
+
top: 0;
|
|
70
|
+
bottom: 0;
|
|
71
|
+
width: 1px;
|
|
72
|
+
background-color: ${lineColor};
|
|
73
|
+
z-index: 10;
|
|
74
|
+
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
76
|
+
.${instanceClass} .monaco-editor .separator-line {
|
|
77
|
+
background: linear-gradient(
|
|
78
|
+
to bottom,
|
|
79
|
+
transparent ${scaledLineHeight * 0.9 - 2}px,
|
|
80
|
+
${separatorColor} ${scaledLineHeight * 0.9 - 2}px,
|
|
81
|
+
${separatorColor} ${scaledLineHeight * 0.9 + 1}px,
|
|
82
|
+
transparent ${scaledLineHeight * 0.9 + 1}px
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.${instanceClass} .monaco-editor .transparent-text {
|
|
87
|
+
color: transparent !important;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.${instanceClass} .monaco-editor .code-block-box {
|
|
91
|
+
background-color: ${codeBlockBackground};
|
|
92
|
+
border-left: 1px solid ${codeBlockBorderColor};
|
|
93
|
+
border-right: 1px solid ${codeBlockBorderColor};
|
|
94
|
+
padding-left: ${Math.round(8 * zoomLevel)}px;
|
|
95
|
+
padding-right: ${Math.round(8 * zoomLevel)}px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.${instanceClass} .monaco-editor .code-block-top {
|
|
99
|
+
border-top: 1px solid ${codeBlockBorderColor};
|
|
100
|
+
border-top-left-radius: ${Math.round(10 * zoomLevel)}px;
|
|
101
|
+
border-top-right-radius: ${Math.round(10 * zoomLevel)}px;
|
|
102
|
+
overflow: hidden;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.${instanceClass} .monaco-editor .code-block-bottom {
|
|
106
|
+
border-bottom: 1px solid ${codeBlockBorderColor};
|
|
107
|
+
border-bottom-left-radius: ${Math.round(10 * zoomLevel)}px;
|
|
108
|
+
border-bottom-right-radius: ${Math.round(10 * zoomLevel)}px;
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
}
|
|
111
|
+
`);
|
|
111
112
|
|
|
112
113
|
return () => {
|
|
113
114
|
if (process.env.NODE_ENV === 'production') {
|
|
@@ -426,17 +426,10 @@
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
.chatMainFlow .chatChildren {
|
|
429
|
-
grid-area:
|
|
429
|
+
grid-area: π¦;
|
|
430
430
|
width: 100%;
|
|
431
|
-
height: 100%;
|
|
432
431
|
min-width: 0;
|
|
433
|
-
min-height: 0;
|
|
434
432
|
z-index: 300;
|
|
435
|
-
pointer-events: none;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
.chatMainFlow .chatChildren > * {
|
|
439
|
-
pointer-events: auto;
|
|
440
433
|
}
|
|
441
434
|
|
|
442
435
|
/* Chat messages area */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
+
import { spaceTrim } from 'spacetrim';
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
import type { Feature, GeoJsonObject, GeoJsonProperties, Geometry } from 'geojson';
|
|
4
6
|
import type { LatLng, Layer, Map as LeafletMap, Path, PathOptions } from 'leaflet';
|
|
@@ -253,10 +255,12 @@ function createPointOfInterestMarker(leaflet: LeafletNamespace, feature: ChatGeo
|
|
|
253
255
|
|
|
254
256
|
const icon = leaflet.divIcon({
|
|
255
257
|
className: styles.poiMarkerIcon,
|
|
256
|
-
html:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
html: spaceTrim(
|
|
259
|
+
(block) => `
|
|
260
|
+
<span class="${styles.poiMarkerPulse}" aria-hidden="true"></span>
|
|
261
|
+
${block(initialHtml)}
|
|
262
|
+
`,
|
|
263
|
+
).trim(),
|
|
260
264
|
iconSize: [POI_MARKER_CONFIG.size, POI_MARKER_CONFIG.size],
|
|
261
265
|
iconAnchor: POI_MARKER_CONFIG.anchor,
|
|
262
266
|
});
|
|
@@ -681,8 +681,9 @@ export type ChatProps = {
|
|
|
681
681
|
readonly tasksProgress?: Array<{ id: string; name: string; progress?: number }>; // Simplified task progress type
|
|
682
682
|
|
|
683
683
|
/**
|
|
684
|
-
*
|
|
685
|
-
*
|
|
684
|
+
* Optional content displayed in the chat header above the message list.
|
|
685
|
+
*
|
|
686
|
+
* If not provided, the header row is not rendered.
|
|
686
687
|
*/
|
|
687
688
|
readonly children?: ReactNode;
|
|
688
689
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { spaceTrim } from 'spacetrim';
|
|
1
2
|
import { Chat } from '@promptbook/components';
|
|
2
3
|
|
|
3
4
|
export function ChatPreviewChatComponent() {
|
|
@@ -43,7 +44,47 @@ export function ChatPreviewChatComponent() {
|
|
|
43
44
|
createdAt: '2025-10-12T23:13:15.925Z',
|
|
44
45
|
sender: 'ASSISTANT_1',
|
|
45
46
|
content:
|
|
46
|
-
|
|
47
|
+
spaceTrim(`
|
|
48
|
+
**Absolutely!** Hereβs a quick overview:
|
|
49
|
+
|
|
50
|
+
- **Bold**
|
|
51
|
+
- _Italic_
|
|
52
|
+
- __Underline__
|
|
53
|
+
- ~~Strikethrough~~
|
|
54
|
+
- \`Inline code\`
|
|
55
|
+
- Code block:
|
|
56
|
+
|
|
57
|
+
\`\`\`js
|
|
58
|
+
console.log('Hello, world!');
|
|
59
|
+
\`\`\`
|
|
60
|
+
> Blockquote
|
|
61
|
+
> With
|
|
62
|
+
> Multiple lines
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
- Some text with [Link](https://example.com)
|
|
66
|
+
- 
|
|
67
|
+
- Lists:
|
|
68
|
+
- Item 1
|
|
69
|
+
- Nested item
|
|
70
|
+
- Numbered list:
|
|
71
|
+
1. First
|
|
72
|
+
1. Nested
|
|
73
|
+
- Table:
|
|
74
|
+
|
|
75
|
+
| Syntax | Description |
|
|
76
|
+
|--------|-------------|
|
|
77
|
+
| Header | Title |
|
|
78
|
+
| Cell | Data |
|
|
79
|
+
|
|
80
|
+
- Emoji: π π
|
|
81
|
+
- Mention: @user
|
|
82
|
+
- Hashtag: #demo
|
|
83
|
+
- Math: $E=mc^2$
|
|
84
|
+
- Horizontal rule:
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
`),
|
|
47
88
|
isComplete: true,
|
|
48
89
|
},
|
|
49
90
|
{
|
|
@@ -51,7 +92,22 @@ export function ChatPreviewChatComponent() {
|
|
|
51
92
|
createdAt: '2025-10-12T23:13:15.925Z',
|
|
52
93
|
sender: 'USER',
|
|
53
94
|
content:
|
|
54
|
-
|
|
95
|
+
spaceTrim(`
|
|
96
|
+
Wow, that's a lot! Can you combine some of them?
|
|
97
|
+
|
|
98
|
+
**Bold _italic_ and \`inline code\`**
|
|
99
|
+
|
|
100
|
+
Or maybe:
|
|
101
|
+
> _Blockquote with a [link](https://example.com)_
|
|
102
|
+
|
|
103
|
+
And a table:
|
|
104
|
+
|
|
105
|
+
| Name | Value |
|
|
106
|
+
|------|-------|
|
|
107
|
+
| Pi | $\\pi$ |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
`),
|
|
55
111
|
isComplete: true,
|
|
56
112
|
},
|
|
57
113
|
{
|
|
@@ -59,7 +115,19 @@ export function ChatPreviewChatComponent() {
|
|
|
59
115
|
createdAt: '2025-10-12T23:13:15.925Z',
|
|
60
116
|
sender: 'ASSISTANT_1',
|
|
61
117
|
content:
|
|
62
|
-
|
|
118
|
+
spaceTrim(`
|
|
119
|
+
Of course! Hereβs a creative mix:
|
|
120
|
+
|
|
121
|
+
- ~~Strikethrough~~ and __underline__
|
|
122
|
+
- 1. Numbered with *italic* and emoji π
|
|
123
|
+
- - Nested \`inline code\`
|
|
124
|
+
|
|
125
|
+
> Blockquote with math: $a^2 + b^2 = c^2$
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
Let me know if you want to see more! #rich #features
|
|
130
|
+
`),
|
|
63
131
|
isComplete: true,
|
|
64
132
|
},
|
|
65
133
|
{
|
|
@@ -67,7 +135,15 @@ export function ChatPreviewChatComponent() {
|
|
|
67
135
|
createdAt: '2025-10-12T23:13:15.925Z',
|
|
68
136
|
sender: 'ASSISTANT_1',
|
|
69
137
|
content:
|
|
70
|
-
|
|
138
|
+
spaceTrim(`
|
|
139
|
+
And here are some more emojis:
|
|
140
|
+
|
|
141
|
+
ππππ‘πππ₯πβ
β
|
|
142
|
+
β€π§‘ππππ§‘β€οΈπ€π€π
|
|
143
|
+
π±βπ€π±βπ»π±ππ±βππ«ππ«π π
|
|
144
|
+
πππππ€£ππππ
π€©
|
|
145
|
+
βΏππππ
βΏπΆπ»πΉπΎ
|
|
146
|
+
`),
|
|
71
147
|
isComplete: true,
|
|
72
148
|
},
|
|
73
149
|
{
|
|
@@ -75,7 +151,21 @@ export function ChatPreviewChatComponent() {
|
|
|
75
151
|
createdAt: '2025-10-12T23:13:15.925Z',
|
|
76
152
|
sender: 'ASSISTANT_1',
|
|
77
153
|
content:
|
|
78
|
-
|
|
154
|
+
spaceTrim(`
|
|
155
|
+
## And lists:
|
|
156
|
+
|
|
157
|
+
- Item 1
|
|
158
|
+
- Item 2
|
|
159
|
+
- Nested Item 2a
|
|
160
|
+
- Nested Item 2b
|
|
161
|
+
- Item 3
|
|
162
|
+
|
|
163
|
+
1. First item
|
|
164
|
+
2. Second item
|
|
165
|
+
1. Nested second item a
|
|
166
|
+
2. Nested second item b
|
|
167
|
+
3. Third item
|
|
168
|
+
`),
|
|
79
169
|
isComplete: true,
|
|
80
170
|
},
|
|
81
171
|
]}
|