@codex-app-sdk/vue 0.0.0-stage → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -2
  3. package/dist/audio/apple-speech-transcription.d.ts +12 -0
  4. package/dist/audio/apple-speech-transcription.d.ts.map +1 -0
  5. package/dist/audio/browser-audio-recorder.d.ts +21 -0
  6. package/dist/audio/browser-audio-recorder.d.ts.map +1 -0
  7. package/dist/chat/ChatAnimatedDiffStat.vue.d.ts +9 -0
  8. package/dist/chat/ChatAnimatedDiffStat.vue.d.ts.map +1 -0
  9. package/dist/chat/ChatApprovalCard.vue.d.ts +33 -0
  10. package/dist/chat/ChatApprovalCard.vue.d.ts.map +1 -0
  11. package/dist/chat/ChatAttachmentBlock.vue.d.ts +10 -0
  12. package/dist/chat/ChatAttachmentBlock.vue.d.ts.map +1 -0
  13. package/dist/chat/ChatCompactionMessage.vue.d.ts +9 -0
  14. package/dist/chat/ChatCompactionMessage.vue.d.ts.map +1 -0
  15. package/dist/chat/ChatComposerActionMenu.vue.d.ts +43 -0
  16. package/dist/chat/ChatComposerActionMenu.vue.d.ts.map +1 -0
  17. package/dist/chat/ChatComposerActiveModes.vue.d.ts +15 -0
  18. package/dist/chat/ChatComposerActiveModes.vue.d.ts.map +1 -0
  19. package/dist/chat/ChatComposerAtMentionMenu.vue.d.ts +38 -0
  20. package/dist/chat/ChatComposerAtMentionMenu.vue.d.ts.map +1 -0
  21. package/dist/chat/ChatComposerFileMentionMenu.vue.d.ts +14 -0
  22. package/dist/chat/ChatComposerFileMentionMenu.vue.d.ts.map +1 -0
  23. package/dist/chat/ChatComposerPluginMenu.vue.d.ts +13 -0
  24. package/dist/chat/ChatComposerPluginMenu.vue.d.ts.map +1 -0
  25. package/dist/chat/ChatComposerShelf.vue.d.ts +38 -0
  26. package/dist/chat/ChatComposerShelf.vue.d.ts.map +1 -0
  27. package/dist/chat/ChatComposerSkillMenu.vue.d.ts +15 -0
  28. package/dist/chat/ChatComposerSkillMenu.vue.d.ts.map +1 -0
  29. package/dist/chat/ChatComposerSlashMenu.vue.d.ts +16 -0
  30. package/dist/chat/ChatComposerSlashMenu.vue.d.ts.map +1 -0
  31. package/dist/chat/ChatComposerVoiceButton.vue.d.ts +14 -0
  32. package/dist/chat/ChatComposerVoiceButton.vue.d.ts.map +1 -0
  33. package/dist/chat/ChatComposerVoiceField.vue.d.ts +11 -0
  34. package/dist/chat/ChatComposerVoiceField.vue.d.ts.map +1 -0
  35. package/dist/chat/ChatComposerWaveform.vue.d.ts +20 -0
  36. package/dist/chat/ChatComposerWaveform.vue.d.ts.map +1 -0
  37. package/dist/chat/ChatConfirmationRequest.vue.d.ts +14 -0
  38. package/dist/chat/ChatConfirmationRequest.vue.d.ts.map +1 -0
  39. package/dist/chat/ChatContextUsageIndicator.vue.d.ts +8 -0
  40. package/dist/chat/ChatContextUsageIndicator.vue.d.ts.map +1 -0
  41. package/dist/chat/ChatCopyButton.vue.d.ts +10 -0
  42. package/dist/chat/ChatCopyButton.vue.d.ts.map +1 -0
  43. package/dist/chat/ChatFoldTransition.vue.d.ts +17 -0
  44. package/dist/chat/ChatFoldTransition.vue.d.ts.map +1 -0
  45. package/dist/chat/ChatFollowUps.vue.d.ts +12 -0
  46. package/dist/chat/ChatFollowUps.vue.d.ts.map +1 -0
  47. package/dist/chat/ChatGoal.vue.d.ts +14 -0
  48. package/dist/chat/ChatGoal.vue.d.ts.map +1 -0
  49. package/dist/chat/ChatIconButton.vue.d.ts +25 -0
  50. package/dist/chat/ChatIconButton.vue.d.ts.map +1 -0
  51. package/dist/chat/ChatImageLightbox.vue.d.ts +19 -0
  52. package/dist/chat/ChatImageLightbox.vue.d.ts.map +1 -0
  53. package/dist/chat/ChatMediaBlock.vue.d.ts +10 -0
  54. package/dist/chat/ChatMediaBlock.vue.d.ts.map +1 -0
  55. package/dist/chat/ChatMentionChip.vue.d.ts +11 -0
  56. package/dist/chat/ChatMentionChip.vue.d.ts.map +1 -0
  57. package/dist/chat/ChatMermaidBlock.vue.d.ts +7 -0
  58. package/dist/chat/ChatMermaidBlock.vue.d.ts.map +1 -0
  59. package/dist/chat/ChatMessageActions.vue.d.ts +36 -0
  60. package/dist/chat/ChatMessageActions.vue.d.ts.map +1 -0
  61. package/dist/chat/ChatMessageBlock.vue.d.ts +96 -0
  62. package/dist/chat/ChatMessageBlock.vue.d.ts.map +1 -0
  63. package/dist/chat/ChatMessageEditor.vue.d.ts +16 -0
  64. package/dist/chat/ChatMessageEditor.vue.d.ts.map +1 -0
  65. package/dist/chat/ChatModelReasoningSelector.vue.d.ts +36 -0
  66. package/dist/chat/ChatModelReasoningSelector.vue.d.ts.map +1 -0
  67. package/dist/chat/ChatQuestionRequest.vue.d.ts +17 -0
  68. package/dist/chat/ChatQuestionRequest.vue.d.ts.map +1 -0
  69. package/dist/chat/ChatQueuedPrompt.vue.d.ts +18 -0
  70. package/dist/chat/ChatQueuedPrompt.vue.d.ts.map +1 -0
  71. package/dist/chat/ChatQueuedPrompts.vue.d.ts +18 -0
  72. package/dist/chat/ChatQueuedPrompts.vue.d.ts.map +1 -0
  73. package/dist/chat/ChatRichTextEditor.vue.d.ts +63 -0
  74. package/dist/chat/ChatRichTextEditor.vue.d.ts.map +1 -0
  75. package/dist/chat/ChatToolCall.vue.d.ts +24 -0
  76. package/dist/chat/ChatToolCall.vue.d.ts.map +1 -0
  77. package/dist/chat/ChatToolCallTitle.vue.d.ts +24 -0
  78. package/dist/chat/ChatToolCallTitle.vue.d.ts.map +1 -0
  79. package/dist/chat/ChatToolConfirmation.vue.d.ts +24 -0
  80. package/dist/chat/ChatToolConfirmation.vue.d.ts.map +1 -0
  81. package/dist/chat/ChatToolGroup.vue.d.ts +23 -0
  82. package/dist/chat/ChatToolGroup.vue.d.ts.map +1 -0
  83. package/dist/chat/ChatToolIcon.vue.d.ts +10 -0
  84. package/dist/chat/ChatToolIcon.vue.d.ts.map +1 -0
  85. package/dist/chat/ChatToolUserInputRequest.vue.d.ts +27 -0
  86. package/dist/chat/ChatToolUserInputRequest.vue.d.ts.map +1 -0
  87. package/dist/chat/ChatTurnGitInfo.vue.d.ts +8 -0
  88. package/dist/chat/ChatTurnGitInfo.vue.d.ts.map +1 -0
  89. package/dist/chat/ChatUserText.vue.d.ts +37 -0
  90. package/dist/chat/ChatUserText.vue.d.ts.map +1 -0
  91. package/dist/chat/ChatVisualizationBlock.vue.d.ts +13 -0
  92. package/dist/chat/ChatVisualizationBlock.vue.d.ts.map +1 -0
  93. package/dist/chat/ChatWorkGroup.vue.d.ts +21 -0
  94. package/dist/chat/ChatWorkGroup.vue.d.ts.map +1 -0
  95. package/dist/chat/approval-presets.d.ts +10 -0
  96. package/dist/chat/approval-presets.d.ts.map +1 -0
  97. package/dist/chat/chat-i18n.d.ts +6 -0
  98. package/dist/chat/chat-i18n.d.ts.map +1 -0
  99. package/dist/chat/codex-capabilities.d.ts +3 -0
  100. package/dist/chat/codex-capabilities.d.ts.map +1 -0
  101. package/dist/chat/codex-commands.d.ts +3 -0
  102. package/dist/chat/codex-commands.d.ts.map +1 -0
  103. package/dist/chat/composer-commands.d.ts +11 -0
  104. package/dist/chat/composer-commands.d.ts.map +1 -0
  105. package/dist/chat/composer-mentions-custom.d.ts +25 -0
  106. package/dist/chat/composer-mentions-custom.d.ts.map +1 -0
  107. package/dist/chat/composer-mentions.d.ts +9 -0
  108. package/dist/chat/composer-mentions.d.ts.map +1 -0
  109. package/dist/chat/composer-plugins.d.ts +7 -0
  110. package/dist/chat/composer-plugins.d.ts.map +1 -0
  111. package/dist/chat/composer-prompt-history.d.ts +12 -0
  112. package/dist/chat/composer-prompt-history.d.ts.map +1 -0
  113. package/dist/chat/composer-search.d.ts +5 -0
  114. package/dist/chat/composer-search.d.ts.map +1 -0
  115. package/dist/chat/composer-skills.d.ts +22 -0
  116. package/dist/chat/composer-skills.d.ts.map +1 -0
  117. package/dist/chat/contracts.d.ts +194 -0
  118. package/dist/chat/contracts.d.ts.map +1 -0
  119. package/dist/chat/conversation-links.d.ts +9 -0
  120. package/dist/chat/conversation-links.d.ts.map +1 -0
  121. package/dist/chat/file-search.d.ts +5 -0
  122. package/dist/chat/file-search.d.ts.map +1 -0
  123. package/dist/chat/html-escape.d.ts +3 -0
  124. package/dist/chat/html-escape.d.ts.map +1 -0
  125. package/dist/chat/message-actions.d.ts +7 -0
  126. package/dist/chat/message-actions.d.ts.map +1 -0
  127. package/dist/chat/message-blocks.d.ts +55 -0
  128. package/dist/chat/message-blocks.d.ts.map +1 -0
  129. package/dist/chat/message-image.d.ts +18 -0
  130. package/dist/chat/message-image.d.ts.map +1 -0
  131. package/dist/chat/message-markdown.d.ts +13 -0
  132. package/dist/chat/message-markdown.d.ts.map +1 -0
  133. package/dist/chat/message-text-selection.d.ts +16 -0
  134. package/dist/chat/message-text-selection.d.ts.map +1 -0
  135. package/dist/chat/message-time.d.ts +3 -0
  136. package/dist/chat/message-time.d.ts.map +1 -0
  137. package/dist/chat/message-work-state.d.ts +20 -0
  138. package/dist/chat/message-work-state.d.ts.map +1 -0
  139. package/dist/chat/portal-theme.d.ts +6 -0
  140. package/dist/chat/portal-theme.d.ts.map +1 -0
  141. package/dist/chat/queued-prompts.d.ts +6 -0
  142. package/dist/chat/queued-prompts.d.ts.map +1 -0
  143. package/dist/chat/renderer-message-adapter.d.ts +7 -0
  144. package/dist/chat/renderer-message-adapter.d.ts.map +1 -0
  145. package/dist/chat/syntax-highlighting.d.ts +3 -0
  146. package/dist/chat/syntax-highlighting.d.ts.map +1 -0
  147. package/dist/chat/tool-call-details.d.ts +6 -0
  148. package/dist/chat/tool-call-details.d.ts.map +1 -0
  149. package/dist/chat/tool-presentation.d.ts +20 -0
  150. package/dist/chat/tool-presentation.d.ts.map +1 -0
  151. package/dist/chat/tool-status.d.ts +35 -0
  152. package/dist/chat/tool-status.d.ts.map +1 -0
  153. package/dist/chat/tool-visibility.d.ts +6 -0
  154. package/dist/chat/tool-visibility.d.ts.map +1 -0
  155. package/dist/chat/types.d.ts +95 -0
  156. package/dist/chat/types.d.ts.map +1 -0
  157. package/dist/chat/use-chat-composer-suggestions.d.ts +63 -0
  158. package/dist/chat/use-chat-composer-suggestions.d.ts.map +1 -0
  159. package/dist/chat/use-chat-composer-voice.d.ts +50 -0
  160. package/dist/chat/use-chat-composer-voice.d.ts.map +1 -0
  161. package/dist/chat/use-conversation-escape-interrupt.d.ts +13 -0
  162. package/dist/chat/use-conversation-escape-interrupt.d.ts.map +1 -0
  163. package/dist/chat/user-text.d.ts +32 -0
  164. package/dist/chat/user-text.d.ts.map +1 -0
  165. package/dist/chat/visualization.d.ts +6 -0
  166. package/dist/chat/visualization.d.ts.map +1 -0
  167. package/dist/codex-theme.d.ts +12 -0
  168. package/dist/codex-theme.d.ts.map +1 -0
  169. package/dist/components/CodexApprovalPrompt.vue.d.ts +15 -0
  170. package/dist/components/CodexApprovalPrompt.vue.d.ts.map +1 -0
  171. package/dist/components/CodexComposer.vue.d.ts +110 -0
  172. package/dist/components/CodexComposer.vue.d.ts.map +1 -0
  173. package/dist/components/CodexComposerMenu.vue.d.ts +43 -0
  174. package/dist/components/CodexComposerMenu.vue.d.ts.map +1 -0
  175. package/dist/components/CodexComposerMenuList.vue.d.ts +29 -0
  176. package/dist/components/CodexComposerMenuList.vue.d.ts.map +1 -0
  177. package/dist/components/CodexComposerSendButton.vue.d.ts +25 -0
  178. package/dist/components/CodexComposerSendButton.vue.d.ts.map +1 -0
  179. package/dist/components/CodexConversationHistoryLoader.vue.d.ts +4 -0
  180. package/dist/components/CodexConversationHistoryLoader.vue.d.ts.map +1 -0
  181. package/dist/components/CodexConversationPane.vue.d.ts +254 -0
  182. package/dist/components/CodexConversationPane.vue.d.ts.map +1 -0
  183. package/dist/components/CodexConversationSidebar.vue.d.ts +25 -0
  184. package/dist/components/CodexConversationSidebar.vue.d.ts.map +1 -0
  185. package/dist/components/CodexMessage.vue.d.ts +141 -0
  186. package/dist/components/CodexMessage.vue.d.ts.map +1 -0
  187. package/dist/components/CodexMessageList.vue.d.ts +178 -0
  188. package/dist/components/CodexMessageList.vue.d.ts.map +1 -0
  189. package/dist/components/CodexMessageTurn.vue.d.ts +28 -0
  190. package/dist/components/CodexMessageTurn.vue.d.ts.map +1 -0
  191. package/dist/components/CodexScrollToBottom.vue.d.ts +13 -0
  192. package/dist/components/CodexScrollToBottom.vue.d.ts.map +1 -0
  193. package/dist/components/CodexWorkbenchLayout.vue.d.ts +25 -0
  194. package/dist/components/CodexWorkbenchLayout.vue.d.ts.map +1 -0
  195. package/dist/components/composer-menu-items.d.ts +29 -0
  196. package/dist/components/composer-menu-items.d.ts.map +1 -0
  197. package/dist/composer-menu.d.ts +49 -0
  198. package/dist/composer-menu.d.ts.map +1 -0
  199. package/dist/composer-state.d.ts +8 -0
  200. package/dist/composer-state.d.ts.map +1 -0
  201. package/dist/conversation-pane-controller.d.ts +149 -0
  202. package/dist/conversation-pane-controller.d.ts.map +1 -0
  203. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  204. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  205. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  206. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  207. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  208. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  209. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  210. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  211. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  212. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  213. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  214. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  215. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  216. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  217. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  218. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  219. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  220. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  221. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  222. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  223. package/dist/icons/app-icons.d.ts +2 -0
  224. package/dist/icons/app-icons.d.ts.map +1 -0
  225. package/dist/index.d.ts +99 -0
  226. package/dist/index.d.ts.map +1 -0
  227. package/dist/index.js +8668 -0
  228. package/dist/index.js.map +1 -0
  229. package/dist/native-capabilities.d.ts +11 -0
  230. package/dist/native-capabilities.d.ts.map +1 -0
  231. package/dist/styles.css +4 -0
  232. package/dist/types.d.ts +2 -0
  233. package/dist/types.d.ts.map +1 -0
  234. package/dist/use-codex-live-chat.d.ts +34 -0
  235. package/dist/use-codex-live-chat.d.ts.map +1 -0
  236. package/dist/use-codex-surface.d.ts +3639 -0
  237. package/dist/use-codex-surface.d.ts.map +1 -0
  238. package/package.json +52 -4
@@ -0,0 +1,9 @@
1
+ import type { CodexConversationLink } from './contracts';
2
+ export type CodexEditorFileReference = {
3
+ path: string;
4
+ line: number;
5
+ column?: number;
6
+ };
7
+ export declare function parseCodexEditorFileReference(value: string): CodexEditorFileReference | null;
8
+ export declare function codexConversationLinkFromHref(href: string): CodexConversationLink | null;
9
+ //# sourceMappingURL=conversation-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-links.d.ts","sourceRoot":"","sources":["../../src/chat/conversation-links.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI,CAU5F;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CA6BxF"}
@@ -0,0 +1,5 @@
1
+ import type { CodexFileSearchItem } from './contracts';
2
+ export declare const MAX_FILE_SEARCH_RESULTS = 50;
3
+ export declare function filterFileSearchItems<T extends CodexFileSearchItem>(files: T[], query: string, maxResults?: number): T[];
4
+ export declare function fuzzyScore(pattern: string, target: string): number;
5
+ //# sourceMappingURL=file-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-search.d.ts","sourceRoot":"","sources":["../../src/chat/file-search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,mBAAmB,EACjE,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,MAAM,EACb,UAAU,SAA0B,GACnC,CAAC,EAAE,CAkBL;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmBlE"}
@@ -0,0 +1,3 @@
1
+ export declare function escapeHtml(content: string): string;
2
+ export declare function escapeAttribute(content: string): string;
3
+ //# sourceMappingURL=html-escape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-escape.d.ts","sourceRoot":"","sources":["../../src/chat/html-escape.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,UAOzC;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,UAE9C"}
@@ -0,0 +1,7 @@
1
+ import type { CodexHostCapabilities } from '@codex-app-sdk/core/native';
2
+ export declare function stripMessageMarkup(content: string): string;
3
+ export declare function copyableMessageText(content: string): string;
4
+ export declare function copyableMessageHtml(content: string): string;
5
+ export declare function copyMessageToClipboard(content: string, hostCapabilities?: CodexHostCapabilities | undefined): Promise<void>;
6
+ export declare function copyTextToClipboard(text: string, hostCapabilities?: CodexHostCapabilities | undefined): Promise<void>;
7
+ //# sourceMappingURL=message-actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-actions.d.ts","sourceRoot":"","sources":["../../src/chat/message-actions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAOvE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,UAKjD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAElD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAElD;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,gBAAgB,GAAE,qBAAqB,GAAG,SAA4C,iBAyBvF;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EACZ,gBAAgB,GAAE,qBAAqB,GAAG,SAA4C,iBAOvF"}
@@ -0,0 +1,55 @@
1
+ import { type Message, type MessageAttachment, type MessageMedia, type MessagePhase, type MessageToolCall, type MessagePart } from './types';
2
+ type PhasedMessageBlock = {
3
+ phase?: MessagePhase;
4
+ };
5
+ export type MessageBlock = {
6
+ type: 'attachment';
7
+ attachment: MessageAttachment;
8
+ } | Extract<MessagePart, {
9
+ type: 'question';
10
+ }> | ({
11
+ type: 'text';
12
+ content: string;
13
+ } & PhasedMessageBlock) | {
14
+ type: 'user-text';
15
+ content: string;
16
+ } | ({
17
+ type: 'reasoning';
18
+ content: string;
19
+ } & PhasedMessageBlock) | ({
20
+ type: 'mermaid';
21
+ code: string;
22
+ } & PhasedMessageBlock) | ({
23
+ type: 'visualization';
24
+ path?: string;
25
+ title: string;
26
+ } & PhasedMessageBlock) | ({
27
+ type: 'media';
28
+ media: MessageMedia;
29
+ toolCall?: MessageToolCall;
30
+ } & PhasedMessageBlock) | {
31
+ type: 'tool';
32
+ toolCall: MessageToolCall;
33
+ } | {
34
+ type: 'tool-group';
35
+ toolCalls: MessageToolCall[];
36
+ activityTitle?: string;
37
+ } | ({
38
+ type: 'follow-ups';
39
+ prompts: string[];
40
+ } & PhasedMessageBlock);
41
+ export type RenderedMessageBlock = MessageBlock | {
42
+ type: 'work-group';
43
+ active: boolean;
44
+ blocks: MessageBlock[];
45
+ continuation?: boolean;
46
+ finalStarted: boolean;
47
+ };
48
+ export declare function computeMessageBlocks(message: Message): MessageBlock[];
49
+ export declare function groupAssistantWorkBlocks(message: Message, blocks: MessageBlock[], workActive?: boolean, groupWork?: boolean, answeredClientRequestIds?: ReadonlySet<string>): RenderedMessageBlock[];
50
+ export declare function stripMessageContext(content: string): string;
51
+ export declare function groupToolBlocks(blocks: MessageBlock[]): MessageBlock[];
52
+ export declare function hasExplicitAssistantWorkPhases(message: Message): boolean;
53
+ export declare function isAssistantWorkBlock(block: MessageBlock, answeredClientRequestIds?: ReadonlySet<string>): boolean;
54
+ export {};
55
+ //# sourceMappingURL=message-blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-blocks.d.ts","sourceRoot":"","sources":["../../src/chat/message-blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAA;AAE5L,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,iBAAiB,CAAA;CAAE,GACrD,OAAO,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,GAC1C,CAAC;IAAE,IA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AwB,CACtC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,EAAE,EACtB,UAAU,UAA6B,EACvC,SAAS,UAA0C,EACnD,wBAAwB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC7C,oBAAoB,EAAE,CAgCxB;AA6HD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,UAOlD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CA8CtE;AA+CD,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,WAI9D;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,wBAAwB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,WAKvG"}
@@ -0,0 +1,18 @@
1
+ import type { Message } from './types';
2
+ export type CodexMessageImage = {
3
+ alt: string;
4
+ kind: 'attachment' | 'media';
5
+ mimeType?: string;
6
+ name?: string;
7
+ path?: string;
8
+ src: string;
9
+ title?: string;
10
+ };
11
+ export type CodexMessageImageOpenHandler = (image: CodexMessageImage, context?: CodexMessageImageContext) => boolean | void | Promise<boolean | void>;
12
+ export type CodexMessageImageOpenIntent = 'fullscreen' | 'open';
13
+ export type CodexMessageImageContext = {
14
+ intent: CodexMessageImageOpenIntent;
15
+ index?: number;
16
+ message?: Message;
17
+ };
18
+ //# sourceMappingURL=message-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-image.d.ts","sourceRoot":"","sources":["../../src/chat/message-image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,YAAY,GAAG,OAAO,CAAA;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,CACzC,KAAK,EAAE,iBAAiB,EACxB,OAAO,CAAC,EAAE,wBAAwB,KAC/B,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAA;AAE7C,MAAM,MAAM,2BAA2B,GAAG,YAAY,GAAG,MAAM,CAAA;AAE/D,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,2BAA2B,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
@@ -0,0 +1,13 @@
1
+ export declare function renderMarkdown(content: string, options?: {
2
+ codeCopyLabel?: string;
3
+ }): string;
4
+ export declare function renderUserText(content: string): string;
5
+ /**
6
+ * Returns a browser-safe Markdown href or null when the link uses an executable
7
+ * or otherwise unsupported scheme. Relative paths and in-document fragments
8
+ * deliberately remain relative so the host can resolve them against its own
9
+ * workspace policy.
10
+ */
11
+ export declare function safeMarkdownHref(value: string): string | null;
12
+ export declare function renderInlineToken(token: unknown): string;
13
+ //# sourceMappingURL=message-markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-markdown.d.ts","sourceRoot":"","sources":["../../src/chat/message-markdown.ts"],"names":[],"mappings":"AAyFA,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,UAIzC;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,UAI7C;AA4CD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoC7D;AA6BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAoCxD"}
@@ -0,0 +1,16 @@
1
+ import type { Message } from './types';
2
+ export type CodexMessageTextSelectionAnchor = {
3
+ height: number;
4
+ width: number;
5
+ x: number;
6
+ y: number;
7
+ };
8
+ export type CodexMessageTextSelection = {
9
+ anchor: CodexMessageTextSelectionAnchor;
10
+ messageId?: string;
11
+ messageIndex: number;
12
+ role: Message['role'];
13
+ text: string;
14
+ turnId?: string;
15
+ };
16
+ //# sourceMappingURL=message-text-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-text-selection.d.ts","sourceRoot":"","sources":["../../src/chat/message-text-selection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,MAAM,EAAE,+BAA+B,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function formatMessageSentAt(value: string, now?: Date): string;
2
+ export declare function fullMessageSentAt(value: string): string;
3
+ //# sourceMappingURL=message-time.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-time.d.ts","sourceRoot":"","sources":["../../src/chat/message-time.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAa,UA0BlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,UAU9C"}
@@ -0,0 +1,20 @@
1
+ import type { ComputedRef, InjectionKey, Ref } from 'vue';
2
+ import type { CodexSurfaceTurnStatus } from '@codex-app-sdk/core/surface';
3
+ import type { ClientRequestResponse } from './contracts';
4
+ export declare const questionResponsesKey: InjectionKey<Map<string, ClientRequestResponse['payload']>>;
5
+ export type AssistantWorkTurnContext = {
6
+ active: ComputedRef<boolean>;
7
+ completedWithoutFinal: ComputedRef<boolean>;
8
+ enabled: ComputedRef<boolean>;
9
+ expanded: Ref<boolean>;
10
+ finalStarted: ComputedRef<boolean>;
11
+ headerMessageIndex: ComputedRef<number | undefined>;
12
+ latestStreamingAssistantIndex: ComputedRef<number | undefined>;
13
+ phased: ComputedRef<boolean>;
14
+ status: ComputedRef<CodexSurfaceTurnStatus | undefined>;
15
+ turnId: ComputedRef<string | undefined>;
16
+ toggle: () => void;
17
+ };
18
+ export declare const assistantWorkTurnKey: InjectionKey<AssistantWorkTurnContext>;
19
+ export declare const assistantWorkMessageIndexKey: InjectionKey<ComputedRef<number>>;
20
+ //# sourceMappingURL=message-work-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message-work-state.d.ts","sourceRoot":"","sources":["../../src/chat/message-work-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAExD,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAA8C,CAAA;AAE3I,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,qBAAqB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3C,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC7B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACtB,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAClC,kBAAkB,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACnD,6BAA6B,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC9D,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,MAAM,EAAE,WAAW,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAAA;IACvD,MAAM,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACvC,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,wBAAwB,CAA+C,CAAA;AACvH,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAwD,CAAA"}
@@ -0,0 +1,6 @@
1
+ export type CodexPortalTheme = {
2
+ mode: 'dark' | 'light';
3
+ style: Record<string, string>;
4
+ };
5
+ export declare function captureCodexPortalTheme(element: Element | null): CodexPortalTheme;
6
+ //# sourceMappingURL=portal-theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"portal-theme.d.ts","sourceRoot":"","sources":["../../src/chat/portal-theme.ts"],"names":[],"mappings":"AAyCA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,gBAAgB,CAgBjF"}
@@ -0,0 +1,6 @@
1
+ export type QueuedChatPrompt = {
2
+ id: string;
3
+ text: string;
4
+ };
5
+ export declare function createQueuedChatPrompt(text: string): QueuedChatPrompt;
6
+ //# sourceMappingURL=queued-prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queued-prompts.d.ts","sourceRoot":"","sources":["../../src/chat/queued-prompts.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAIF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAMrE"}
@@ -0,0 +1,7 @@
1
+ import type { SurfaceMessage } from '@codex-app-sdk/core/surface';
2
+ import type { Message } from './types';
3
+ export type ChatMessageInput = Message | SurfaceMessage;
4
+ export declare function chatMessagesFromInputs(messages: readonly ChatMessageInput[]): Message[];
5
+ export declare function chatMessageFromInput(message: ChatMessageInput): Message;
6
+ export declare function surfaceMessageToChatMessage(message: SurfaceMessage): Message;
7
+ //# sourceMappingURL=renderer-message-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer-message-adapter.d.ts","sourceRoot":"","sources":["../../src/chat/renderer-message-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,6BAA6B,CAAC;AACtF,OAAO,KAAK,EAAE,OAAO,EAAoD,MAAM,SAAS,CAAC;AAEzF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,cAAc,CAAC;AAExD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,EAAE,CAEvF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAIvE;AAED,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAwD5E"}
@@ -0,0 +1,3 @@
1
+ export declare function renderCodeBlock(code: string, language: string | undefined): string;
2
+ export declare function languageForFilePath(filePath: string | undefined): string | undefined;
3
+ //# sourceMappingURL=syntax-highlighting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syntax-highlighting.d.ts","sourceRoot":"","sources":["../../src/chat/syntax-highlighting.ts"],"names":[],"mappings":"AAqDA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,UAkBzE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAyCpF"}
@@ -0,0 +1,6 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
2
+ /** Enables access to raw tool-call input and output for the current Vue subtree. */
3
+ export declare function provideCodexToolCallDetails(enabled: MaybeRefOrGetter<boolean>): void;
4
+ /** Reads the subtree-level raw tool-call detail policy. The secure default is disabled. */
5
+ export declare function useCodexToolCallDetails(): ComputedRef<boolean>;
6
+ //# sourceMappingURL=tool-call-details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-details.d.ts","sourceRoot":"","sources":["../../src/chat/tool-call-details.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,WAAW,EAEhB,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAC;AAMb,oFAAoF;AACpF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,IAAI,CAEpF;AAED,2FAA2F;AAC3F,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,OAAO,CAAC,CAG9D"}
@@ -0,0 +1,20 @@
1
+ import { type Component } from 'vue';
2
+ import type { MessageToolCall, ToolStatusDescriptor } from './types';
3
+ export type CodexToolPresentationContext = {
4
+ descriptor?: ToolStatusDescriptor;
5
+ kind?: string;
6
+ metadata?: Readonly<Record<string, unknown>>;
7
+ toolCall: MessageToolCall;
8
+ };
9
+ export type CodexToolPresentation = {
10
+ /** Replaces the SDK icon. Use null to render no icon. */
11
+ icon?: Component | null;
12
+ /** Replaces the SDK title while leaving the rest of the tool row intact. */
13
+ title?: string;
14
+ };
15
+ export type CodexToolPresentationResolver = (context: CodexToolPresentationContext) => CodexToolPresentation | undefined;
16
+ /** Configures tool icons and titles for the current Vue component tree. */
17
+ export declare function provideCodexToolPresentation(resolver: CodexToolPresentationResolver): void;
18
+ /** Reads the nearest tool-presentation resolver, falling back to SDK presentation. */
19
+ export declare function useCodexToolPresentation(): CodexToolPresentationResolver;
20
+ //# sourceMappingURL=tool-presentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-presentation.d.ts","sourceRoot":"","sources":["../../src/chat/tool-presentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EAEf,MAAM,KAAK,CAAC;AACb,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAErE,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC7C,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,yDAAyD;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,CAC1C,OAAO,EAAE,4BAA4B,KAClC,qBAAqB,GAAG,SAAS,CAAC;AAOvC,2EAA2E;AAC3E,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,6BAA6B,GAAG,IAAI,CAE1F;AAED,sFAAsF;AACtF,wBAAgB,wBAAwB,IAAI,6BAA6B,CAExE"}
@@ -0,0 +1,35 @@
1
+ import type { CodexConversationLink } from './contracts';
2
+ import { type MessageToolCall, type ToolStatusDescriptor } from './types';
3
+ type Translate = (key: string, params?: Record<string, unknown>) => string;
4
+ export type ToolLineDiff = {
5
+ addedLines: number;
6
+ removedLines: number;
7
+ };
8
+ export type CodexToolTitlePresenterContext = {
9
+ descriptor: ToolStatusDescriptor | undefined;
10
+ toolCall: MessageToolCall;
11
+ translate: Translate;
12
+ };
13
+ export type CodexToolTitlePresenter = (context: CodexToolTitlePresenterContext) => string | undefined;
14
+ export type CodexToolDisplayTargetPart = {
15
+ label: string;
16
+ link?: CodexConversationLink;
17
+ separator?: string;
18
+ suffix?: string;
19
+ };
20
+ export declare function registerCodexToolTitlePresenter(presenter: CodexToolTitlePresenter): () => void;
21
+ export declare function parseToolStatusDescriptor(value: unknown): ToolStatusDescriptor | undefined;
22
+ export declare function getToolLineDiff(descriptor: ToolStatusDescriptor | undefined): ToolLineDiff | undefined;
23
+ export declare function getToolGroupLineDiff(toolCalls: readonly MessageToolCall[]): ToolLineDiff | undefined;
24
+ export declare function getToolDisplayTitle(toolCall: MessageToolCall, descriptor: ToolStatusDescriptor | undefined, t?: Translate): string;
25
+ export declare function getToolDisplayTitleParts(toolCall: MessageToolCall, descriptor: ToolStatusDescriptor | undefined, t?: Translate): {
26
+ prefix?: string;
27
+ target?: string;
28
+ title: string;
29
+ };
30
+ export declare function getToolDisplayTargetLink(toolCall: MessageToolCall, descriptor: ToolStatusDescriptor | undefined, target?: string): CodexConversationLink | undefined;
31
+ export declare function getToolDisplayTargetParts(toolCall: MessageToolCall, descriptor: ToolStatusDescriptor | undefined, _target?: string): CodexToolDisplayTargetPart[] | undefined;
32
+ export declare function getToolFallbackTitle(toolCall: MessageToolCall, t?: Translate): string;
33
+ export declare function defaultToolTranslate(key: string, params?: Record<string, unknown>): string;
34
+ export {};
35
+ //# sourceMappingURL=tool-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-status.d.ts","sourceRoot":"","sources":["../../src/chat/tool-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA+B,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAqD,KAAK,eAAe,EAAE,KAAK,oBAAoB,E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,GAAE,SAAgC,GAClC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAYrD;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,oBAAoB,GAAG,SAAS,EAC5C,MAAM,CAAC,EAAE,MAAM,GACd,qBAAqB,GAAG,SAAS,CAEnC;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,oBAAoB,GAAG,SAAS,EAC5C,OAAO,CAAC,EAAE,MAAM,GACf,0BAA0B,EAAE,GAAG,SAAS,CAwC1C;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAC,GAAE,SAAgC,UAKlG;AAmHD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UA0CjF"}
@@ -0,0 +1,6 @@
1
+ import type { SurfaceMessage } from '@codex-app-sdk/core/surface';
2
+ import type { Message, MessageToolCall } from './types';
3
+ /** Return false to hide a tool call from the rendered transcript only. */
4
+ export type CodexToolVisibility = (toolCall: MessageToolCall) => boolean;
5
+ export declare function filterVisibleMessageTools(message: Message | SurfaceMessage, visibility: CodexToolVisibility | undefined): Message | SurfaceMessage | null;
6
+ //# sourceMappingURL=tool-visibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-visibility.d.ts","sourceRoot":"","sources":["../../src/chat/tool-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAGjE,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEvD,0EAA0E;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,eAAe,KAAK,OAAO,CAAA;AAExE,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GAAG,cAAc,EACjC,UAAU,EAAE,mBAAmB,GAAG,SAAS,GAC1C,OAAO,GAAG,cAAc,GAAG,IAAI,CAiBjC"}
@@ -0,0 +1,95 @@
1
+ export type ToolExecutionState = 'running' | 'completed' | 'error' | 'canceled';
2
+ export type ToolStatusDescriptor = {
3
+ action: string;
4
+ phase: string;
5
+ params?: Record<string, unknown>;
6
+ source: string;
7
+ };
8
+ export type MessageToolCall = {
9
+ args: unknown;
10
+ done?: boolean;
11
+ function: string;
12
+ id: string;
13
+ /** Assistant message that contains this tool call, when adapted from a surface message. */
14
+ messageId?: string;
15
+ kind?: string;
16
+ metadata?: Readonly<Record<string, unknown>>;
17
+ /** App-server item id for this tool call, when available. */
18
+ itemId?: string;
19
+ state: ToolExecutionState;
20
+ status?: string;
21
+ /** Turn that produced this tool call, when adapted from a surface message. */
22
+ turnId?: string;
23
+ result: unknown;
24
+ };
25
+ export declare function getMessageToolCallName(toolCall: MessageToolCall): string;
26
+ export declare function isImageGenerationToolCall(toolCall: MessageToolCall): boolean;
27
+ export declare function getMessageToolCallArgs(toolCall: MessageToolCall): unknown;
28
+ export type MessageMedia = {
29
+ alt?: string;
30
+ mimeType?: string;
31
+ prompt?: string;
32
+ title?: string;
33
+ url: string;
34
+ };
35
+ export type MessageAttachment = {
36
+ kind: 'file' | 'image';
37
+ name: string;
38
+ path?: string;
39
+ url?: string;
40
+ mimeType?: string;
41
+ };
42
+ export type MessagePhase = 'commentary' | 'final_answer';
43
+ export type MessagePart = {
44
+ type: 'attachment';
45
+ attachment: MessageAttachment;
46
+ } | {
47
+ type: 'media';
48
+ media: MessageMedia;
49
+ } | {
50
+ type: 'question';
51
+ historical?: boolean;
52
+ request: Extract<CodexSurfaceClientRequest, {
53
+ kind: 'ask_user';
54
+ }>;
55
+ } | {
56
+ type: 'reasoning';
57
+ summary: string;
58
+ itemId?: string;
59
+ summaryIndex?: number;
60
+ } | {
61
+ type: 'text';
62
+ content: string;
63
+ itemId?: string;
64
+ phase?: MessagePhase;
65
+ } | {
66
+ type: 'tool';
67
+ toolCall: MessageToolCall;
68
+ };
69
+ export type MessageSuggestedPrompt = {
70
+ kind: 'chat' | 'idea';
71
+ text: string;
72
+ };
73
+ export type Message = {
74
+ compactionStatus?: 'completed' | 'running';
75
+ role: 'user' | 'assistant';
76
+ content: string;
77
+ createdAt?: string;
78
+ engine?: string;
79
+ id?: string;
80
+ model?: string;
81
+ parts?: MessagePart[];
82
+ streaming?: boolean;
83
+ suggestedPrompts?: MessageSuggestedPrompt[];
84
+ toolCalls?: MessageToolCall[];
85
+ /** Turn that produced this message, when available. */
86
+ turnId?: string;
87
+ type?: 'compaction' | 'display' | 'steer' | 'text';
88
+ };
89
+ export type ChatModelOption = {
90
+ engine: string;
91
+ internalId: string;
92
+ label: string;
93
+ };
94
+ import type { CodexSurfaceClientRequest } from '@codex-app-sdk/core/surface';
95
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/chat/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC;AAEhF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;I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f,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AACF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { type Ref } from 'vue';
2
+ import type { CodexFileSearchItem, CodexCommandSummary, CodexSkillSummary } from './contracts';
3
+ import type { CodexSurfacePlugin } from '@codex-app-sdk/core/surface';
4
+ import { type CodexComposerMentionGroup, type CodexComposerMentionItem } from './composer-mentions-custom';
5
+ type ChatComposerSuggestionOptions<Payload = unknown> = {
6
+ caretPosition: Ref<number>;
7
+ commands: () => readonly CodexCommandSummary[];
8
+ disabled: () => boolean;
9
+ files: () => readonly CodexFileSearchItem[];
10
+ plugins?: () => readonly CodexSurfacePlugin[];
11
+ mentionGroups?: () => readonly CodexComposerMentionGroup<Payload>[];
12
+ onMentionSelected?: (item: CodexComposerMentionItem<Payload>, group: CodexComposerMentionGroup<Payload>) => void;
13
+ isSending: () => boolean;
14
+ onCommandActivated?: (command: CodexCommandSummary) => void;
15
+ onCommandSubmitted: (prompt: string) => void;
16
+ onTextInserted: (caretPosition: number) => void;
17
+ prompt: Ref<string>;
18
+ skills: () => readonly CodexSkillSummary[];
19
+ skillsEnabled: () => boolean;
20
+ editor: Ref<{
21
+ getSelectionRange: () => {
22
+ end: number;
23
+ start: number;
24
+ valid: boolean;
25
+ };
26
+ } | null>;
27
+ };
28
+ export declare function useChatComposerSuggestions<Payload = unknown>(options: ChatComposerSuggestionOptions<Payload>): {
29
+ activeAtIndex: Ref<number, number>;
30
+ activeFileIndex: Ref<number, number>;
31
+ activeSkillIndex: Ref<number, number>;
32
+ activePluginIndex: Ref<number, number>;
33
+ activeSlashIndex: Ref<number, number>;
34
+ atMenuVisible: import("vue").ComputedRef<boolean>;
35
+ close: () => void;
36
+ closeSoon: () => void;
37
+ resume: () => void;
38
+ fileMenuShowsHint: import("vue").ComputedRef<boolean>;
39
+ fileMenuVisible: import("vue").ComputedRef<boolean>;
40
+ handleKeydown: (event: KeyboardEvent) => boolean;
41
+ selectCommand: (command: CodexCommandSummary) => void;
42
+ selectFile: (file: CodexFileSearchItem) => void;
43
+ selectSkill: (skill: CodexSkillSummary) => void;
44
+ selectPlugin: (plugin: CodexSurfacePlugin) => void;
45
+ selectMention: (item: CodexComposerMentionItem<Payload>, group: CodexComposerMentionGroup<Payload>) => void;
46
+ selectSlashSkill: (skill: CodexSkillSummary) => void;
47
+ skillMenuVisible: import("vue").ComputedRef<boolean>;
48
+ pluginMenuVisible: import("vue").ComputedRef<boolean>;
49
+ slashMenuVisible: import("vue").ComputedRef<boolean>;
50
+ suspend: () => void;
51
+ sync: () => void;
52
+ updateCaretPosition: (range?: {
53
+ end: number;
54
+ }) => void;
55
+ visibleFiles: import("vue").ComputedRef<CodexFileSearchItem[]>;
56
+ visibleSkills: import("vue").ComputedRef<CodexSkillSummary[]>;
57
+ visiblePlugins: import("vue").ComputedRef<CodexSurfacePlugin[]>;
58
+ visibleMentionGroups: import("vue").ComputedRef<import("./composer-mentions-custom").CodexComposerVisibleMentionGroup<Payload>[]>;
59
+ visibleSlashCommands: import("vue").ComputedRef<CodexCommandSummary[]>;
60
+ visibleSlashSkills: import("vue").ComputedRef<never[]>;
61
+ };
62
+ export {};
63
+ //# sourceMappingURL=use-chat-composer-suggestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-chat-composer-suggestions.d.ts","sourceRoot":"","sources":["../../src/chat/use-chat-composer-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AACpD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAMrE,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAA;AA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AAG,OAAO;6BAsHrB,mBAAmB,KAAG,IAAI;uBAxChC,mBAAmB,KAAG,IAAI;yBAQxB,iBAAiB,KAAG,IAAI;2BAOtB,kBAAkB,KAAG,IAAI;0BAQ/C,wBAAwB,CAAC,OAAO,CAAC,SAChC,yBAAyB,CAAC,OAAO,CAAC,KACxC,IAAI;8BAQ0B,iBAAiB,KAAG,IAAI;;;;mBAuErC,IAAI;gBASP,IAAI;kCAxBgB;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAG,IAAI;;;;;;;EA4F5D"}
@@ -0,0 +1,50 @@
1
+ import { type ComputedRef, type Ref } from 'vue';
2
+ import type { CodexSpeechTranscriptionResult, CodexChatTranscription } from './contracts';
3
+ import { BrowserAudioRecorder, type RecordedAudio } from '../audio/browser-audio-recorder';
4
+ export type CodexComposerVoiceOptions = {
5
+ isDisabled: () => boolean;
6
+ isSending: () => boolean;
7
+ onTranscript: (text: string) => void | Promise<void>;
8
+ transcribeAudio?: CodexChatTranscription;
9
+ };
10
+ export type CodexComposerVoiceRecorder = {
11
+ getAnalyser(): AnalyserNode | null;
12
+ getBufferLength(): number;
13
+ };
14
+ export type CodexComposerVoiceController = {
15
+ buttonDisabled: ComputedRef<boolean>;
16
+ buttonLabel: ComputedRef<string>;
17
+ buttonTitle: ComputedRef<string>;
18
+ error: Ref<string | null>;
19
+ isRecording: Ref<boolean>;
20
+ isTranscribing: Ref<boolean>;
21
+ recorder: ComputedRef<CodexComposerVoiceRecorder | null>;
22
+ stop: () => Promise<boolean>;
23
+ toggle: () => Promise<void>;
24
+ dispose: () => void;
25
+ };
26
+ type ChatComposerVoiceDependencies = {
27
+ canTranscribe: () => boolean;
28
+ createRecorder: () => BrowserAudioRecorder;
29
+ isRecordingSupported: () => boolean;
30
+ transcribe: (recording: RecordedAudio) => Promise<CodexSpeechTranscriptionResult>;
31
+ };
32
+ export declare function useChatComposerVoice(options: CodexComposerVoiceOptions, dependencyOverrides?: Partial<ChatComposerVoiceDependencies>): {
33
+ buttonDisabled: ComputedRef<boolean>;
34
+ buttonLabel: ComputedRef<"Stop recording" | "Record voice prompt">;
35
+ buttonTitle: ComputedRef<string>;
36
+ error: Ref<string | null, string | null>;
37
+ isRecording: Ref<boolean, boolean>;
38
+ isTranscribing: Ref<boolean, boolean>;
39
+ recorder: ComputedRef<CodexComposerVoiceRecorder | null>;
40
+ stop: () => Promise<boolean>;
41
+ toggle: () => Promise<void>;
42
+ dispose: () => void;
43
+ };
44
+ /**
45
+ * Public voice controller for composing the SDK's voice button and waveform
46
+ * without depending on the full CodexComposer component.
47
+ */
48
+ export declare function useCodexComposerVoice(options: CodexComposerVoiceOptions): CodexComposerVoiceController;
49
+ export {};
50
+ //# sourceMappingURL=use-chat-composer-voice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-chat-composer-voice.d.ts","sourceRoot":"","sources":["../../src/chat/use-chat-composer-voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAChG,OAAO,KAAK,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACzF,OAAO,EACL,oBAAoB,EAEpB,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAA;AAIxC,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,OAAO,CAAA;IACzB,SAAS,EAAE,MAAM,OAAO,CAAA;IACxB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,eAAe,CAAC,EAAE,sBAAsB,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,IAAI,YAAY,GAAG,IAAI,CAAA;IAClC,eAAe,IAAI,MAAM,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IACpC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IACzB,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IAC5B,QAAQ,EAAE,WAAW,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAA;IACxD,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAED,KAAK,6BAA6B,GAAG;IACnC,aAAa,EAAE,MAAM,OAAO,CAAA;IAC5B,cAAc,EAAE,MAAM,oBAAoB,CAAA;IAC1C,oBAAoB,EAAE,MAAM,OAAO,CAAA;IACnC,UAAU,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAA;CAClF,CAAA;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,yBAAyB,EAClC,mBAAmB,GAAE,OAAO,CAAC,6BAA6B,CAAM;;;;;;;;gBA8EzC,OAAO,CAAC,OAAO,CAAC;kBAzBd,OAAO,CAAC,IAAI,CAAC;mBAoDlB,IAAI;EAsBzB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,yBAAyB,GACjC,4BAA4B,CAE9B"}
@@ -0,0 +1,13 @@
1
+ import { type Ref } from 'vue';
2
+ type ConversationEscapeInterruptOptions = {
3
+ root: Readonly<Ref<HTMLElement | null>>;
4
+ busy(): boolean;
5
+ enabled(): boolean;
6
+ onInterrupt(): void;
7
+ };
8
+ export declare function useConversationEscapeInterrupt(options: ConversationEscapeInterruptOptions): {
9
+ armed: Ref<boolean>;
10
+ clear(): void;
11
+ };
12
+ export {};
13
+ //# sourceMappingURL=use-conversation-escape-interrupt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-conversation-escape-interrupt.d.ts","sourceRoot":"","sources":["../../src/chat/use-conversation-escape-interrupt.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,GAAG,EACT,MAAM,KAAK,CAAC;AAEb,KAAK,kCAAkC,GAAG;IACxC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC;IACxC,IAAI,IAAI,OAAO,CAAC;IAChB,OAAO,IAAI,OAAO,CAAC;IACnB,WAAW,IAAI,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,kCAAkC,GAAG;IAC3F,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACpB,KAAK,IAAI,IAAI,CAAC;CACf,CA2EA"}