langgraph-ui-components 0.0.27 → 0.0.29
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 +103 -4
- package/dist/_virtual/index.cjs.js +1 -1
- package/dist/_virtual/index.cjs2.js +1 -1
- package/dist/_virtual/index.cjs3.js +1 -1
- package/dist/_virtual/index.es.js +5 -2
- package/dist/_virtual/index.es2.js +4 -2
- package/dist/_virtual/index.es2.js.map +1 -1
- package/dist/_virtual/index.es3.js +4 -4
- package/dist/components/ChatBody.cjs.js +2 -2
- package/dist/components/ChatBody.cjs.js.map +1 -1
- package/dist/components/ChatBody.d.ts.map +1 -1
- package/dist/components/ChatBody.es.js +191 -164
- package/dist/components/ChatBody.es.js.map +1 -1
- package/dist/components/TodoList.cjs.js +2 -0
- package/dist/components/TodoList.cjs.js.map +1 -0
- package/dist/components/TodoList.d.ts +5 -0
- package/dist/components/TodoList.d.ts.map +1 -0
- package/dist/components/TodoList.es.js +65 -0
- package/dist/components/TodoList.es.js.map +1 -0
- package/dist/components/messages/AgentMessage.cjs.js +2 -2
- package/dist/components/messages/AgentMessage.cjs.js.map +1 -1
- package/dist/components/messages/AgentMessage.d.ts +3 -1
- package/dist/components/messages/AgentMessage.d.ts.map +1 -1
- package/dist/components/messages/AgentMessage.es.js +107 -104
- package/dist/components/messages/AgentMessage.es.js.map +1 -1
- package/dist/components/messages/CustomComponentRender.cjs.js.map +1 -1
- package/dist/components/messages/CustomComponentRender.es.js.map +1 -1
- package/dist/components/ui/syntax-highlighter.cjs.js +1 -1
- package/dist/components/ui/syntax-highlighter.cjs.js.map +1 -1
- package/dist/components/ui/syntax-highlighter.es.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/cjs/styles/prism/index.cjs.js +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/cjs/styles/prism/index.es.js +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-languages/create-language-async-loader.cjs.js +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-languages/create-language-async-loader.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-languages/create-language-async-loader.es.js +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-syntax-highlighter.cjs.js +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-syntax-highlighter.cjs.js.map +1 -1
- package/dist/node_modules/.pnpm/react-syntax-highlighter@16.1.0_react@19.2.3/node_modules/react-syntax-highlighter/dist/esm/async-syntax-highlighter.es.js +1 -1
- package/dist/pages/Chat/Chat.cjs.js +1 -1
- package/dist/pages/Chat/Chat.cjs.js.map +1 -1
- package/dist/pages/Chat/Chat.d.ts.map +1 -1
- package/dist/pages/Chat/Chat.es.js +41 -34
- package/dist/pages/Chat/Chat.es.js.map +1 -1
- package/dist/pages/Sidebar/sidebar.cjs.js +1 -1
- package/dist/pages/Sidebar/sidebar.cjs.js.map +1 -1
- package/dist/pages/Sidebar/sidebar.d.ts.map +1 -1
- package/dist/pages/Sidebar/sidebar.es.js +75 -70
- package/dist/pages/Sidebar/sidebar.es.js.map +1 -1
- package/dist/providers/Stream.cjs.js +1 -1
- package/dist/providers/Stream.cjs.js.map +1 -1
- package/dist/providers/Stream.d.ts +40 -8
- package/dist/providers/Stream.d.ts.map +1 -1
- package/dist/providers/Stream.es.js +136 -123
- package/dist/providers/Stream.es.js.map +1 -1
- package/package.json +25 -1
- package/src/components/ChatBody.tsx +158 -67
- package/src/components/TodoList.tsx +72 -0
- package/src/components/messages/AgentMessage.tsx +7 -1
- package/src/components/messages/CustomComponentRender.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/pages/Chat/Chat.tsx +13 -3
- package/src/pages/Sidebar/sidebar.tsx +12 -3
- package/src/providers/Stream.tsx +76 -32
- package/dist/_virtual/index.cjs10.js +0 -2
- package/dist/_virtual/index.cjs10.js.map +0 -1
- package/dist/_virtual/index.cjs11.js +0 -2
- package/dist/_virtual/index.cjs11.js.map +0 -1
- package/dist/_virtual/index.cjs12.js +0 -2
- package/dist/_virtual/index.cjs12.js.map +0 -1
- package/dist/_virtual/index.cjs4.js +0 -2
- package/dist/_virtual/index.cjs4.js.map +0 -1
- package/dist/_virtual/index.cjs5.js +0 -2
- package/dist/_virtual/index.cjs5.js.map +0 -1
- package/dist/_virtual/index.cjs6.js +0 -2
- package/dist/_virtual/index.cjs6.js.map +0 -1
- package/dist/_virtual/index.cjs7.js +0 -2
- package/dist/_virtual/index.cjs7.js.map +0 -1
- package/dist/_virtual/index.cjs8.js +0 -2
- package/dist/_virtual/index.cjs8.js.map +0 -1
- package/dist/_virtual/index.cjs9.js +0 -2
- package/dist/_virtual/index.cjs9.js.map +0 -1
- package/dist/_virtual/index.es10.js +0 -8
- package/dist/_virtual/index.es10.js.map +0 -1
- package/dist/_virtual/index.es11.js +0 -5
- package/dist/_virtual/index.es11.js.map +0 -1
- package/dist/_virtual/index.es12.js +0 -8
- package/dist/_virtual/index.es12.js.map +0 -1
- package/dist/_virtual/index.es4.js +0 -6
- package/dist/_virtual/index.es4.js.map +0 -1
- package/dist/_virtual/index.es5.js +0 -5
- package/dist/_virtual/index.es5.js.map +0 -1
- package/dist/_virtual/index.es6.js +0 -5
- package/dist/_virtual/index.es6.js.map +0 -1
- package/dist/_virtual/index.es7.js +0 -5
- package/dist/_virtual/index.es7.js.map +0 -1
- package/dist/_virtual/index.es8.js +0 -5
- package/dist/_virtual/index.es8.js.map +0 -1
- package/dist/_virtual/index.es9.js +0 -5
- package/dist/_virtual/index.es9.js.map +0 -1
- package/dist/_virtual/lower-bound.cjs.js +0 -2
- package/dist/_virtual/lower-bound.cjs.js.map +0 -1
- package/dist/_virtual/lower-bound.es.js +0 -5
- package/dist/_virtual/lower-bound.es.js.map +0 -1
- package/dist/_virtual/priority-queue.cjs.js +0 -2
- package/dist/_virtual/priority-queue.cjs.js.map +0 -1
- package/dist/_virtual/priority-queue.es.js +0 -5
- package/dist/_virtual/priority-queue.es.js.map +0 -1
- package/dist/_virtual/re.cjs.js +0 -2
- package/dist/_virtual/re.cjs.js.map +0 -1
- package/dist/_virtual/re.es.js +0 -5
- package/dist/_virtual/re.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/_virtual/_rolldown/runtime.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/_virtual/_rolldown/runtime.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/_virtual/_rolldown/runtime.es.js +0 -12
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/_virtual/_rolldown/runtime.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/errors/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/errors/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/errors/index.es.js +0 -66
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/errors/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.es.js +0 -283
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/anthropic.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.es.js +0 -219
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/bedrock_converse.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/data.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/data.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/data.es.js +0 -42
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/data.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/deepseek.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/deepseek.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/deepseek.es.js +0 -31
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/deepseek.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google.es.js +0 -77
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_genai.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_genai.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_genai.es.js +0 -78
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_genai.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_vertexai.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_vertexai.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_vertexai.es.js +0 -75
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/google_vertexai.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/groq.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/groq.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/groq.es.js +0 -51
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/groq.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/index.es.js +0 -23
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/ollama.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/ollama.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/ollama.es.js +0 -31
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/ollama.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/openai.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/openai.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/openai.es.js +0 -241
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/openai.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/utils.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/utils.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/utils.es.js +0 -37
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/utils.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/xai.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/xai.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/xai.es.js +0 -42
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/block_translators/xai.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/content/data.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/content/data.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/content/data.es.js +0 -16
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/messages/content/data.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/tracers/console.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/tracers/console.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/tracers/console.es.js +0 -9
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/tracers/console.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/index.es.js +0 -3
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.es.js +0 -230
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/core.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.cjs.js +0 -3
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.es.js +0 -87
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/fast-json-patch/src/helpers.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/json.cjs.js +0 -3
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/json.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/json.es.js +0 -133
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/json.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/namespace.cjs.js +0 -2
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/namespace.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/namespace.es.js +0 -29
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/namespace.es.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/sax-js/sax.cjs.js +0 -10
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/sax-js/sax.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/sax-js/sax.es.js +0 -795
- package/dist/node_modules/.pnpm/@langchain_core@1.1.33_openai@6.16.0_zod@4.3.5_/node_modules/@langchain/core/dist/utils/sax-js/sax.es.js.map +0 -1
- package/dist/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.es.js +0 -111
- package/dist/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.es.js +0 -30
- package/dist/node_modules/.pnpm/camelcase@6.3.0/node_modules/camelcase/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.es.js +0 -112
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/_uuid.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/_uuid.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/_uuid.es.js +0 -3
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/_uuid.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.es.js +0 -6
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fs.browser.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fs.browser.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fs.browser.es.js +0 -14
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/fs.browser.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/p-queue.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/p-queue.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/p-queue.es.js +0 -3
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/p-queue.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/prompt_cache/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/prompt_cache/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/prompt_cache/index.es.js +0 -200
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/prompt_cache/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/xxhash/xxhash.cjs.js +0 -2
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/xxhash/xxhash.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/xxhash/xxhash.es.js +0 -22
- package/dist/node_modules/.pnpm/langsmith@0.5.10_openai@6.16.0_zod@4.3.5_/node_modules/langsmith/dist/utils/xxhash/xxhash.es.js.map +0 -1
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.es.js +0 -18
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.es.js +0 -198
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs.js +0 -2
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.es.js +0 -20
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.es.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs.js +0 -2
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.es.js +0 -41
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.es.js.map +0 -1
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.es.js +0 -45
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.es.js +0 -57
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/comparator.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.es.js +0 -149
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/range.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.es.js +0 -170
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/classes/semver.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.es.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.es.js +0 -40
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/cmp.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.es.js +0 -34
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/coerce.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.es.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-build.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare-loose.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/compare.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.es.js +0 -25
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/eq.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gt.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/gte.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.es.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/inc.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lt.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/lte.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/major.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/minor.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/neq.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.es.js +0 -22
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/patch.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.es.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rcompare.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/rsort.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.es.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/satisfies.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/sort.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.es.js +0 -15
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.es.js +0 -98
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/index.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.es.js +0 -29
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.es.js +0 -9
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/debug.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.es.js +0 -19
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/identifiers.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.es.js +0 -33
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/lrucache.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.es.js +0 -11
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/parse-options.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.es.js +0 -33
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/re.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/gtr.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/intersects.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/ltr.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.es.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/max-satisfying.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.es.js +0 -23
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-satisfying.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.es.js +0 -43
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/min-version.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.es.js +0 -45
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/outside.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.es.js +0 -25
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/simplify.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.es.js +0 -95
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/subset.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.es.js +0 -12
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/to-comparators.es.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.cjs.js +0 -2
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.cjs.js.map +0 -1
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.es.js +0 -18
- package/dist/node_modules/.pnpm/semver@7.7.3/node_modules/semver/ranges/valid.es.js.map +0 -1
- package/src/App.css +0 -183
- package/src/App.tsx +0 -70
- package/src/main.tsx +0 -9
|
@@ -1,231 +1,258 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import { jsx as d, jsxs as F, Fragment as de } from "react/jsx-runtime";
|
|
2
|
+
import { useStreamContext as pe } from "../providers/Stream.es.js";
|
|
3
|
+
import { useCustomComponents as fe } from "../providers/CustomComponentProvider.es.js";
|
|
4
|
+
import { logger as ge } from "../utils/logger.es.js";
|
|
5
|
+
import { isAiWithToolCalls as W, isToolMessage as k } from "../utils/utils.es.js";
|
|
6
|
+
import J, { useState as he, useMemo as x, useRef as A, useCallback as g, useEffect as T, useLayoutEffect as me } from "react";
|
|
7
|
+
import ye from "./messages/AgentMessage.es.js";
|
|
8
|
+
import ve from "./messages/CustomComponentRender.es.js";
|
|
9
|
+
import Me from "./messages/HumanMessage.es.js";
|
|
10
|
+
import Q from "./Thinking.es.js";
|
|
11
|
+
function je({ setIsFirstMessage: R, enableToolCallIndicator: _ = !0, chatBodyProps: j }) {
|
|
12
|
+
const a = pe(), { interruptComponents: X } = fe(), N = a.messages, u = a.isLoading, [B, Z] = he({});
|
|
13
|
+
ge.debug("ChatBody render - messages count:", N, "isLoading:", u);
|
|
14
|
+
const c = x(() => N ?? [], [N]), q = x(() => {
|
|
15
|
+
const e = /* @__PURE__ */ new Set(), n = a.values?.ui;
|
|
16
|
+
if (!Array.isArray(n)) return e;
|
|
17
|
+
for (const o of n) {
|
|
18
|
+
const r = o, i = r.metadata && typeof r.metadata == "object" ? r.metadata : void 0, h = [
|
|
19
|
+
typeof r.id == "string" ? r.id : void 0,
|
|
20
|
+
typeof i?.id == "string" ? i.id : void 0,
|
|
21
|
+
typeof i?.message_id == "string" ? i.message_id : void 0
|
|
22
|
+
];
|
|
23
|
+
for (const p of h)
|
|
24
|
+
p && e.add(p);
|
|
25
|
+
}
|
|
26
|
+
return e;
|
|
27
|
+
}, [a.values?.ui]), y = A(null), K = A(0), C = A(!0), z = A(/* @__PURE__ */ new Map()), L = g((e) => Array.isArray(e) ? e.map((n, o) => {
|
|
28
|
+
if (!n || typeof n != "object") return null;
|
|
29
|
+
const r = n, i = r.status;
|
|
30
|
+
return typeof r.content != "string" || i !== "pending" && i !== "in_progress" && i !== "completed" ? null : {
|
|
31
|
+
id: r.id && typeof r.id == "string" ? r.id : `todo-${o}`,
|
|
32
|
+
content: r.content,
|
|
33
|
+
status: i,
|
|
34
|
+
updatedAt: r.updatedAt instanceof Date || typeof r.updatedAt == "string" || typeof r.updatedAt == "number" ? r.updatedAt : void 0,
|
|
35
|
+
run_id: typeof r.run_id == "string" ? r.run_id : void 0,
|
|
36
|
+
runId: typeof r.runId == "string" ? r.runId : void 0,
|
|
37
|
+
messageId: typeof r.messageId == "string" ? r.messageId : void 0,
|
|
38
|
+
checkpoint: typeof r.checkpoint == "string" ? r.checkpoint : void 0
|
|
39
|
+
};
|
|
40
|
+
}).filter((n) => n !== null) : [], []), O = g((e, n) => {
|
|
41
|
+
Z((o) => ({
|
|
42
|
+
...o,
|
|
43
|
+
[e]: n
|
|
31
44
|
}));
|
|
32
|
-
}, []),
|
|
45
|
+
}, []), D = g(async (e) => {
|
|
33
46
|
if (!e) {
|
|
34
47
|
console.error("No parent checkpoint available for regeneration");
|
|
35
48
|
return;
|
|
36
49
|
}
|
|
37
|
-
await
|
|
50
|
+
await a.submit(void 0, {
|
|
38
51
|
checkpoint: e,
|
|
39
52
|
streamMode: ["values"],
|
|
40
53
|
streamSubgraphs: !0,
|
|
41
54
|
streamResumable: !0
|
|
42
55
|
});
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
56
|
+
}, [a]), G = g((e) => {
|
|
57
|
+
a.setBranch(e);
|
|
58
|
+
}, [a]), b = g((e) => {
|
|
59
|
+
a.submit(null, {
|
|
60
|
+
command: { resume: e },
|
|
61
|
+
streamMode: ["values", "messages-tuple", "updates", "custom"],
|
|
62
|
+
streamSubgraphs: !0
|
|
63
|
+
});
|
|
64
|
+
}, [a]), $ = x(() => {
|
|
65
|
+
const e = a.interrupt;
|
|
49
66
|
if (!e) return null;
|
|
50
|
-
const
|
|
67
|
+
const o = e.value?.actionRequests ?? [];
|
|
51
68
|
return {
|
|
52
69
|
approve: () => {
|
|
53
|
-
|
|
54
|
-
decisions:
|
|
70
|
+
b({
|
|
71
|
+
decisions: o.map(() => ({ type: "approve" }))
|
|
55
72
|
});
|
|
56
73
|
},
|
|
57
|
-
reject: (
|
|
58
|
-
|
|
59
|
-
decisions:
|
|
74
|
+
reject: (r) => {
|
|
75
|
+
b({
|
|
76
|
+
decisions: o.map(() => ({
|
|
60
77
|
type: "reject",
|
|
61
|
-
message:
|
|
78
|
+
message: r || void 0
|
|
62
79
|
}))
|
|
63
80
|
});
|
|
64
81
|
},
|
|
65
|
-
edit: (
|
|
66
|
-
const
|
|
67
|
-
|
|
82
|
+
edit: (r) => {
|
|
83
|
+
const i = o[0];
|
|
84
|
+
b({
|
|
68
85
|
decisions: [
|
|
69
86
|
{
|
|
70
87
|
type: "edit",
|
|
71
88
|
editedAction: {
|
|
72
|
-
name:
|
|
73
|
-
args: { ...
|
|
89
|
+
name: i?.name ?? "",
|
|
90
|
+
args: { ...i?.args, ...r }
|
|
74
91
|
}
|
|
75
92
|
}
|
|
76
93
|
]
|
|
77
94
|
});
|
|
78
95
|
}
|
|
79
96
|
};
|
|
80
|
-
}, [
|
|
81
|
-
(
|
|
82
|
-
|
|
83
|
-
let s = {};
|
|
84
|
-
if (n?.input)
|
|
85
|
-
if (typeof n.input == "string")
|
|
86
|
-
try {
|
|
87
|
-
s = re(n.input) ?? {};
|
|
88
|
-
} catch {
|
|
89
|
-
s = {};
|
|
90
|
-
}
|
|
91
|
-
else typeof n.input == "object" && (s = n.input);
|
|
92
|
-
return {
|
|
93
|
-
name: n.name ?? "",
|
|
94
|
-
id: n.id ?? "",
|
|
95
|
-
args: s,
|
|
96
|
-
type: "tool_call"
|
|
97
|
-
};
|
|
98
|
-
}) : [], []), u = d(() => {
|
|
99
|
-
if (f.current) {
|
|
100
|
-
let e = f.current.parentElement;
|
|
97
|
+
}, [a.interrupt, b]), f = g(() => {
|
|
98
|
+
if (y.current) {
|
|
99
|
+
let e = y.current.parentElement;
|
|
101
100
|
for (; e; ) {
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
101
|
+
const n = window.getComputedStyle(e);
|
|
102
|
+
if (n.overflowY === "auto" || n.overflowY === "scroll")
|
|
104
103
|
return e;
|
|
105
104
|
e = e.parentElement;
|
|
106
105
|
}
|
|
107
106
|
}
|
|
108
107
|
return null;
|
|
109
108
|
}, []);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}, [
|
|
113
|
-
const
|
|
114
|
-
const
|
|
115
|
-
if (!e.content.length && !
|
|
109
|
+
T(() => {
|
|
110
|
+
c.length > 0 && R && R(!1);
|
|
111
|
+
}, [c.length, R]);
|
|
112
|
+
const U = g((e, n, o) => {
|
|
113
|
+
const r = u && n === o.length - 1 && e.type === "ai";
|
|
114
|
+
if (!e.content.length && !W(e) && !r || e.additional_kwargs?.hidden)
|
|
116
115
|
return null;
|
|
117
|
-
const
|
|
116
|
+
const i = e.id ?? `msg-${n}`, h = (t) => typeof t.id == "string" && q.has(t.id);
|
|
118
117
|
if (e.type === "human")
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
if (
|
|
118
|
+
return /* @__PURE__ */ d(Me, { message: e, fontSize: j?.fontSize }, i);
|
|
119
|
+
if (k(e))
|
|
121
120
|
return null;
|
|
122
|
-
if (e.type === "ai" &&
|
|
123
|
-
let t =
|
|
124
|
-
for (; t >= 0 &&
|
|
121
|
+
if (e.type === "ai" && n > 0) {
|
|
122
|
+
let t = n - 1;
|
|
123
|
+
for (; t >= 0 && k(o[t]); )
|
|
125
124
|
t--;
|
|
126
|
-
if (t >= 0 &&
|
|
125
|
+
if (t >= 0 && o[t].type === "ai" && !h(e))
|
|
127
126
|
return null;
|
|
128
127
|
}
|
|
129
|
-
const
|
|
130
|
-
let
|
|
131
|
-
for (;
|
|
132
|
-
const t =
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
else if (t.type === "ai")
|
|
136
|
-
|
|
137
|
-
|
|
128
|
+
const p = [e];
|
|
129
|
+
let v = n + 1;
|
|
130
|
+
for (; v < o.length; ) {
|
|
131
|
+
const t = o[v];
|
|
132
|
+
if (k(t))
|
|
133
|
+
p.push(t), v++;
|
|
134
|
+
else if (t.type === "ai") {
|
|
135
|
+
if (h(t))
|
|
136
|
+
break;
|
|
137
|
+
p.push(t), v++;
|
|
138
|
+
} else
|
|
138
139
|
break;
|
|
139
140
|
}
|
|
140
|
-
const
|
|
141
|
+
const l = p.filter((t) => t.type === "ai"), H = l.some((t) => Array.isArray(t.content)), m = /* @__PURE__ */ new Set(), S = H ? l.flatMap((t) => Array.isArray(t.content) ? t.content.filter((s) => {
|
|
142
|
+
if (s.type === "text" && typeof s.text == "string") {
|
|
143
|
+
if (m.has(s.text)) return !1;
|
|
144
|
+
m.add(s.text);
|
|
145
|
+
}
|
|
146
|
+
return !0;
|
|
147
|
+
}) : typeof t.content == "string" && t.content.length > 0 ? m.has(t.content) ? [] : (m.add(t.content), [{ type: "text", text: t.content }]) : []) : (() => {
|
|
148
|
+
const t = [];
|
|
149
|
+
for (const s of l) {
|
|
150
|
+
const M = typeof s.content == "string" ? s.content : "";
|
|
151
|
+
M && !m.has(M) && (m.add(M), t.push(M));
|
|
152
|
+
}
|
|
153
|
+
return t.join(`
|
|
141
154
|
|
|
142
|
-
`)
|
|
155
|
+
`);
|
|
156
|
+
})(), ee = H ? S.map((t) => t.type === "text" ? t.text : "").filter(Boolean).join(" ") : S, te = {
|
|
143
157
|
...e,
|
|
144
|
-
content:
|
|
145
|
-
},
|
|
158
|
+
content: S
|
|
159
|
+
}, Y = e ? a.getMessagesMetadata(e) : void 0, ne = H ? S.some(
|
|
146
160
|
(t) => t.type === "thinking" && t.thinking?.length > 0 || t.type === "reasoning" && t.reasoning?.length > 0
|
|
147
|
-
) : !1,
|
|
148
|
-
const
|
|
149
|
-
return typeof
|
|
150
|
-
}),
|
|
151
|
-
const
|
|
152
|
-
return Array.isArray(
|
|
153
|
-
}),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
161
|
+
) : !1, re = l.some((t) => {
|
|
162
|
+
const s = t.additional_kwargs;
|
|
163
|
+
return typeof s?.reasoning_content == "string" && s.reasoning_content.length > 0;
|
|
164
|
+
}), oe = l.some((t) => {
|
|
165
|
+
const s = t.additional_kwargs;
|
|
166
|
+
return Array.isArray(s?.tool_status) && s.tool_status.length > 0;
|
|
167
|
+
}), se = p.some((t) => k(t)), ae = _ && (l.some((t) => W(t)) || oe || se), V = !!ee || ne || re || ae, ie = v >= o.length, w = u && ie, I = l.map((t) => t.id).filter((t) => typeof t == "string" && t.length > 0).join("|") || i, ce = (() => {
|
|
168
|
+
const t = z.current.get(I);
|
|
169
|
+
if (!w && t && t.length > 0)
|
|
170
|
+
return t;
|
|
171
|
+
if (w) {
|
|
172
|
+
const s = L(a.values?.todos);
|
|
173
|
+
if (s.length > 0)
|
|
174
|
+
return z.current.set(I, s), s;
|
|
175
|
+
}
|
|
176
|
+
for (let s = l.length - 1; s >= 0; s--) {
|
|
177
|
+
const le = a.getMessagesMetadata(l[s])?.firstSeenState?.values, E = L(le?.todos);
|
|
178
|
+
if (E.length > 0)
|
|
179
|
+
return (!t || t.length === 0) && z.current.set(I, E), t ?? E;
|
|
180
|
+
}
|
|
181
|
+
return t && t.length > 0 ? t : [];
|
|
182
|
+
})(), ue = w && !V;
|
|
183
|
+
return /* @__PURE__ */ F(J.Fragment, { children: [
|
|
184
|
+
ue && /* @__PURE__ */ d(Q, {}),
|
|
185
|
+
V && /* @__PURE__ */ d(
|
|
186
|
+
ye,
|
|
158
187
|
{
|
|
159
|
-
agentName:
|
|
160
|
-
fontSize:
|
|
161
|
-
message:
|
|
162
|
-
groupedMessages:
|
|
163
|
-
showToolActivity:
|
|
164
|
-
isStreaming:
|
|
165
|
-
onRegenerate:
|
|
166
|
-
feedback: e.id ?
|
|
167
|
-
onFeedback:
|
|
168
|
-
branch:
|
|
169
|
-
branchOptions:
|
|
170
|
-
onBranchSelect:
|
|
188
|
+
agentName: j?.agentName,
|
|
189
|
+
fontSize: j?.fontSize,
|
|
190
|
+
message: te,
|
|
191
|
+
groupedMessages: p,
|
|
192
|
+
showToolActivity: _,
|
|
193
|
+
isStreaming: w,
|
|
194
|
+
onRegenerate: D,
|
|
195
|
+
feedback: e.id ? B[e.id] : void 0,
|
|
196
|
+
onFeedback: O,
|
|
197
|
+
branch: Y?.branch,
|
|
198
|
+
branchOptions: Y?.branchOptions,
|
|
199
|
+
onBranchSelect: G,
|
|
200
|
+
todos: ce
|
|
171
201
|
}
|
|
172
202
|
),
|
|
173
|
-
|
|
174
|
-
] },
|
|
175
|
-
}, [a,
|
|
176
|
-
const
|
|
177
|
-
return
|
|
178
|
-
}), [
|
|
179
|
-
return
|
|
180
|
-
const e =
|
|
203
|
+
l.map((t) => /* @__PURE__ */ d(ve, { message: t, thread: a }, t.id))
|
|
204
|
+
] }, i);
|
|
205
|
+
}, [u, a, L, _, D, B, O, G, q]), P = x(() => c.map((e, n) => {
|
|
206
|
+
const o = U(e, n, c);
|
|
207
|
+
return o && !o.key ? J.cloneElement(o, { key: e.id ?? `msg-${n}` }) : o;
|
|
208
|
+
}), [c, U]);
|
|
209
|
+
return T(() => {
|
|
210
|
+
const e = f();
|
|
181
211
|
if (!e) return;
|
|
182
|
-
const
|
|
183
|
-
const { scrollTop:
|
|
184
|
-
|
|
212
|
+
const n = () => {
|
|
213
|
+
const { scrollTop: o, scrollHeight: r, clientHeight: i } = e, h = r - o - i;
|
|
214
|
+
C.current = h < 100;
|
|
185
215
|
};
|
|
186
|
-
return e.addEventListener("scroll",
|
|
187
|
-
}, [
|
|
188
|
-
const e =
|
|
216
|
+
return e.addEventListener("scroll", n), () => e.removeEventListener("scroll", n);
|
|
217
|
+
}, [f]), T(() => {
|
|
218
|
+
const e = f();
|
|
189
219
|
if (!e) return;
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
}, [
|
|
193
|
-
const e =
|
|
194
|
-
if (!e || !
|
|
195
|
-
const
|
|
196
|
-
|
|
220
|
+
const n = c.length;
|
|
221
|
+
n > K.current && (e.scrollTop = e.scrollHeight, C.current = !0), K.current = n;
|
|
222
|
+
}, [c, f]), T(() => {
|
|
223
|
+
const e = f();
|
|
224
|
+
if (!e || !u) return;
|
|
225
|
+
const n = new MutationObserver(() => {
|
|
226
|
+
C.current && e && (e.scrollTop = e.scrollHeight);
|
|
197
227
|
});
|
|
198
|
-
return
|
|
228
|
+
return y.current && n.observe(y.current, {
|
|
199
229
|
childList: !0,
|
|
200
230
|
subtree: !0,
|
|
201
231
|
characterData: !0
|
|
202
|
-
}), () =>
|
|
203
|
-
}, [
|
|
204
|
-
const e =
|
|
205
|
-
|
|
206
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), () => n.disconnect();
|
|
233
|
+
}, [u, f]), me(() => {
|
|
234
|
+
const e = f();
|
|
235
|
+
u && C.current && e && (e.scrollTop = e.scrollHeight);
|
|
236
|
+
}), /* @__PURE__ */ d(
|
|
207
237
|
"div",
|
|
208
238
|
{
|
|
209
|
-
ref:
|
|
239
|
+
ref: y,
|
|
210
240
|
className: "flex flex-col gap-4 rounded-4xl p-2",
|
|
211
|
-
children:
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
] }) : "Start a conversation..." }) : /* @__PURE__ */
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const e = i[i.length - 1];
|
|
222
|
-
return e.type === "human" || e.type === "ai" && !e.content && A(e);
|
|
223
|
-
})() && /* @__PURE__ */ l(Y, {})
|
|
241
|
+
children: c.length === 0 ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center h-full text-zinc-500", children: u ? /* @__PURE__ */ F("div", { className: "flex items-center gap-2", children: [
|
|
242
|
+
/* @__PURE__ */ d("div", { className: "animate-spin h-5 w-5 border-2 border-zinc-500 border-t-transparent rounded-full" }),
|
|
243
|
+
/* @__PURE__ */ d("span", { children: "Loading conversation..." })
|
|
244
|
+
] }) : "Start a conversation..." }) : /* @__PURE__ */ F(de, { children: [
|
|
245
|
+
P,
|
|
246
|
+
u && c.length > 0 && c[c.length - 1].type === "human" && /* @__PURE__ */ d(Q, {}),
|
|
247
|
+
!u && a.interrupt && $ && (() => {
|
|
248
|
+
const e = a.interrupt.value, n = e?.actionRequests?.[0]?.name, o = n ? X[n] : void 0;
|
|
249
|
+
return o ? /* @__PURE__ */ d(o, { interrupt: e, actions: $ }) : null;
|
|
250
|
+
})()
|
|
224
251
|
] })
|
|
225
252
|
}
|
|
226
253
|
);
|
|
227
254
|
}
|
|
228
255
|
export {
|
|
229
|
-
|
|
256
|
+
je as default
|
|
230
257
|
};
|
|
231
258
|
//# sourceMappingURL=ChatBody.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBody.es.js","sources":["../../src/components/ChatBody.tsx"],"sourcesContent":["import { parsePartialJson } from \"@langchain/core/output_parsers\";\nimport { useStreamContext } from \"@/providers/Stream\";\nimport { useCustomComponents } from \"@/providers/CustomComponentProvider\";\nimport type { chatBodyProps } from \"@/types/ChatProps\";\nimport { logger } from \"@/utils/logger\";\nimport { isAiWithToolCalls, isToolMessage } from \"@/utils/utils\";\nimport type { AIMessage, Message } from \"@langchain/langgraph-sdk\";\nimport React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport AgentMessage from \"./messages/AgentMessage\";\nimport CustomComponentRender from \"./messages/CustomComponentRender\";\nimport HumanMessage from \"./messages/HumanMessage\";\nimport type { MessageFeedback } from \"./messages/MessageActions\";\nimport Thinking from \"./Thinking\";\n\nexport default function ChatBody({ setIsFirstMessage, enableToolCallIndicator = true, chatBodyProps }: { setIsFirstMessage?: React.Dispatch<React.SetStateAction<boolean>>, enableToolCallIndicator?: boolean, chatBodyProps?: chatBodyProps }) {\n const stream = useStreamContext();\n const { interruptComponents } = useCustomComponents();\n const messages = stream.messages;\n const isLoading = stream.isLoading;\n\n // State to track message feedback (likes/dislikes)\n const [messageFeedback, setMessageFeedback] = useState<Record<string, MessageFeedback>>({});\n\n logger.debug(\"ChatBody render - messages count:\", messages, \"isLoading:\", isLoading);\n\n // Memoize messages with stable reference\n const memoMessages = useMemo(() => messages ?? [], [messages]);\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const prevMessageCountRef = useRef(0);\n const shouldAutoScrollRef = useRef(true);\n\n // Handler for message feedback\n const handleFeedback = useCallback((messageId: string, feedback: MessageFeedback) => {\n setMessageFeedback(prev => ({\n ...prev,\n [messageId]: feedback,\n }));\n }, []);\n\n // Handler for message regeneration\n const handleRegenerate = useCallback(async (\n parentCheckpoint: any | null | undefined,\n ) => {\n if (!parentCheckpoint) {\n console.error(\"No parent checkpoint available for regeneration\");\n return;\n }\n\n await stream.submit(undefined, {\n checkpoint: parentCheckpoint,\n streamMode: [\"values\"],\n streamSubgraphs: true,\n streamResumable: true,\n });\n }, [stream]);\n\n // Handler for selecting a different branch\n const handleBranchSelect = useCallback((branch: string) => {\n stream.setBranch(branch);\n }, [stream]);\n\n // Handler for HITL interrupt responses\n const handleInterruptRespond = useCallback((response: any) => {\n stream.submit(null, { command: { resume: response } });\n }, [stream]);\n\n // Build interrupt actions for custom renderers\n const interruptActions = useMemo(() => {\n const interrupt = stream.interrupt;\n if (!interrupt) return null;\n const payload = interrupt.value as any;\n const actionRequests = payload?.actionRequests ?? [];\n return {\n approve: () => {\n handleInterruptRespond({\n decisions: actionRequests.map(() => ({ type: \"approve\" as const })),\n });\n },\n reject: (reason?: string) => {\n handleInterruptRespond({\n decisions: actionRequests.map(() => ({\n type: \"reject\" as const,\n message: reason || undefined,\n })),\n });\n },\n edit: (editedArgs: Record<string, unknown>) => {\n const action = actionRequests[0];\n handleInterruptRespond({\n decisions: [\n {\n type: \"edit\" as const,\n editedAction: {\n name: action?.name ?? \"\",\n args: { ...action?.args, ...editedArgs },\n },\n },\n ],\n });\n },\n };\n }, [stream.interrupt, handleInterruptRespond]);\n\n const getToolCallsFromContent = useCallback((content: Message[\"content\"]): AIMessage[\"tool_calls\"] => {\n if (!Array.isArray(content)) return [];\n const toolCallContents = content.filter(\n (c) => typeof c === \"object\" && c !== null && (c as any).type === \"tool_use\" && (c as any).id,\n ) as Array<Record<string, any>>;\n\n return toolCallContents.map((tc) => {\n let args: Record<string, any> = {};\n if (tc?.input) {\n if (typeof tc.input === \"string\") {\n try {\n args = parsePartialJson(tc.input) ?? {};\n } catch {\n args = {};\n }\n } else if (typeof tc.input === \"object\") {\n args = tc.input as Record<string, any>;\n }\n }\n return {\n name: tc.name ?? \"\",\n id: tc.id ?? \"\",\n args,\n type: \"tool_call\",\n };\n });\n }, []);\n\n // Get the parent scroll container\n const getScrollContainer = useCallback(() => {\n if (containerRef.current) {\n // Find the parent with overflow-y-auto class\n let parent = containerRef.current.parentElement;\n while (parent) {\n const style = window.getComputedStyle(parent);\n if (style.overflowY === 'auto' || style.overflowY === 'scroll') {\n return parent;\n }\n parent = parent.parentElement;\n }\n }\n return null;\n }, []);\n\n useEffect(() => {\n if (memoMessages.length > 0 && setIsFirstMessage) {\n setIsFirstMessage(false);\n }\n }, [memoMessages.length, setIsFirstMessage]);\n\n // Memoize message rendering logic to prevent unnecessary re-renders\n const renderMessage = useCallback((msg: typeof messages[0], index: number, messagesArray: typeof messages) => {\n const isCurrentlyStreamingMessage = isLoading && index === messagesArray.length - 1 && msg.type === \"ai\";\n if (!msg.content.length && !isAiWithToolCalls(msg) && !isCurrentlyStreamingMessage) return null;\n\n if (msg.additional_kwargs?.hidden) {\n return null;\n }\n\n // Use message id or fallback to index for key\n const msgKey = msg.id ?? `msg-${index}`;\n\n if (msg.type === \"human\") {\n return <HumanMessage key={msgKey} message={msg} fontSize={chatBodyProps?.fontSize} />;\n }\n\n // Skip standalone tool messages\n if (isToolMessage(msg)) {\n return null;\n }\n\n // Skip if this AI message was already combined with a previous one\n if (msg.type === \"ai\" && index > 0) {\n // Check if previous non-tool message is also an AI message\n let prevIndex = index - 1;\n while (prevIndex >= 0 && isToolMessage(messagesArray[prevIndex])) {\n prevIndex--;\n }\n\n if (prevIndex >= 0 && messagesArray[prevIndex].type === \"ai\") {\n // This is a consecutive AI message, skip it (it will be combined with the previous one)\n return null;\n }\n }\n\n const groupedTimelineMessages: Message[] = [msg];\n let nextIndex = index + 1;\n\n while (nextIndex < messagesArray.length) {\n const nextMsg = messagesArray[nextIndex];\n\n if (isToolMessage(nextMsg)) {\n groupedTimelineMessages.push(nextMsg);\n nextIndex++;\n } else if (nextMsg.type === \"ai\") {\n groupedTimelineMessages.push(nextMsg);\n nextIndex++;\n } else {\n // Stop at human messages or other types\n break;\n }\n }\n\n const groupedAiMessages = groupedTimelineMessages.filter((m) => m.type === \"ai\");\n const toolMessages = groupedTimelineMessages.filter((m) => isToolMessage(m));\n\n // Merge content from all AI messages, preserving r/reasoning blocks\n const hasArrayContent = groupedAiMessages.some((m) => Array.isArray(m.content));\n const mergedContent: Message[\"content\"] = hasArrayContent\n ? groupedAiMessages.flatMap((m) => {\n if (Array.isArray(m.content)) return m.content as any[];\n if (typeof m.content === \"string\" && m.content.length > 0)\n return [{ type: \"text\", text: m.content }];\n return [];\n })\n : groupedAiMessages\n .map((m) => (typeof m.content === \"string\" ? m.content : \"\"))\n .filter(Boolean)\n .join(\"\\n\\n\");\n\n // Extract plain-text portion for legacy checks (tool-call extraction, etc.)\n const combinedContent = hasArrayContent\n ? (mergedContent as any[])\n .map((c: any) => (c.type === \"text\" ? (c.text as string) : \"\"))\n .filter(Boolean)\n .join(\" \")\n : (mergedContent as string);\n\n const toolCallsFromContent = groupedAiMessages\n .flatMap((m) => {\n const calls = getToolCallsFromContent(m.content);\n return calls || [];\n })\n .filter((tc): tc is NonNullable<typeof tc> => tc != null && tc !== undefined);\n\n // Create a combined message object preserving full content (including thinking blocks)\n const combinedMessage = {\n ...msg,\n content: mergedContent,\n };\n\n // Get branch metadata from thread\n const meta = msg ? stream.getMessagesMetadata(msg) : undefined;\n\n // Determine if there is any displayable content (text OR thinking/reasoning blocks)\n const hasThinkingContent = hasArrayContent\n ? (mergedContent as any[]).some(\n (b: any) =>\n (b.type === \"thinking\" && (b.thinking as string)?.length > 0) ||\n (b.type === \"reasoning\" && (b.reasoning as string)?.length > 0),\n )\n : false;\n const hasKwargsReasoning =\n groupedAiMessages.some((m) => {\n const ak = (m as Record<string, unknown>).additional_kwargs as Record<string, unknown> | undefined;\n return typeof ak?.reasoning_content === \"string\" && (ak.reasoning_content as string).length > 0;\n });\n const hasKwargsToolStatus = groupedAiMessages.some((m) => {\n const ak = (m as Record<string, unknown>).additional_kwargs as Record<string, unknown> | undefined;\n return Array.isArray(ak?.tool_status) && (ak.tool_status as unknown[]).length > 0;\n });\n\n const hasToolCalls =\n groupedAiMessages.some((m) => isAiWithToolCalls(m)) ||\n toolCallsFromContent.length > 0 ||\n toolMessages.length > 0 ||\n hasKwargsToolStatus;\n\n const hasAnyDisplayableContent =\n !!combinedContent ||\n hasThinkingContent ||\n hasKwargsReasoning ||\n (enableToolCallIndicator && hasToolCalls);\n\n const isLastMessageGroup = nextIndex >= messagesArray.length;\n const isStreamingThisMessage = isLoading && isLastMessageGroup;\n\n // Show Thinking animation whenever streaming with no displayable content yet (plain chat or tool-call)\n const showThinkingIndicator = isStreamingThisMessage && !hasAnyDisplayableContent;\n\n return (\n <React.Fragment key={msgKey}>\n {/* 1. Thinking indicator - show when streaming with no content yet (no icon shown) */}\n {showThinkingIndicator && (\n <Thinking />\n )}\n {/* 2. Agent message — pass full mergedContent and grouped timeline for in-order rendering */}\n {hasAnyDisplayableContent && (\n <AgentMessage\n agentName={chatBodyProps?.agentName}\n fontSize={chatBodyProps?.fontSize}\n // agentAvatarUrl={chatBodyProps?.agentAvatarUrl}\n message={combinedMessage}\n groupedMessages={groupedTimelineMessages}\n showToolActivity={enableToolCallIndicator}\n isStreaming={isStreamingThisMessage}\n onRegenerate={handleRegenerate}\n feedback={msg.id ? messageFeedback[msg.id] : undefined}\n onFeedback={handleFeedback}\n branch={meta?.branch}\n branchOptions={meta?.branchOptions}\n onBranchSelect={handleBranchSelect}\n />\n )}\n {/* 3. Custom component (from all messages in the group) */}\n {groupedAiMessages.map((m) => (\n <CustomComponentRender key={m.id} message={m} thread={stream} />\n ))}\n </React.Fragment>\n );\n }, [isLoading, stream, enableToolCallIndicator, handleRegenerate, messageFeedback, handleFeedback, handleBranchSelect]);\n\n // Memoize the rendered messages array\n const renderedMessages = useMemo(() => {\n return memoMessages.map((msg, index) => {\n const element = renderMessage(msg, index, memoMessages);\n // Ensure every element has a key, using message id or fallback to index\n if (element && !element.key) {\n return React.cloneElement(element, { key: msg.id ?? `msg-${index}` });\n }\n return element;\n });\n }, [memoMessages, renderMessage]);\n\n // Track user scroll position to determine if we should auto-scroll\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer) return;\n\n const handleScroll = () => {\n const { scrollTop, scrollHeight, clientHeight } = scrollContainer;\n const distanceFromBottom = scrollHeight - scrollTop - clientHeight;\n // Consider \"at bottom\" if within 100px\n shouldAutoScrollRef.current = distanceFromBottom < 100;\n };\n\n scrollContainer.addEventListener('scroll', handleScroll);\n return () => scrollContainer.removeEventListener('scroll', handleScroll);\n }, [getScrollContainer]);\n\n // Auto-scroll when new messages are added\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer) return;\n\n const currentCount = memoMessages.length;\n const hasNewMessage = currentCount > prevMessageCountRef.current;\n\n if (hasNewMessage) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n shouldAutoScrollRef.current = true;\n }\n\n prevMessageCountRef.current = currentCount;\n }, [memoMessages, getScrollContainer]);\n\n // Use MutationObserver to detect DOM changes and auto-scroll during streaming\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer || !isLoading) return;\n\n const observer = new MutationObserver(() => {\n if (shouldAutoScrollRef.current && scrollContainer) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n }\n });\n\n // Observe the ChatBody container for changes\n if (containerRef.current) {\n observer.observe(containerRef.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n }\n\n return () => observer.disconnect();\n }, [isLoading, getScrollContainer]);\n\n // Use useLayoutEffect to scroll after DOM updates\n useLayoutEffect(() => {\n const scrollContainer = getScrollContainer();\n if (isLoading && shouldAutoScrollRef.current && scrollContainer) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n }\n });\n\n return (\n <div\n ref={containerRef}\n className=\"flex flex-col gap-4 rounded-4xl p-2\"\n >\n {memoMessages.length === 0 ? (\n <div className=\"flex items-center justify-center h-full text-zinc-500\">\n {isLoading ? (\n <div className=\"flex items-center gap-2\">\n <div className=\"animate-spin h-5 w-5 border-2 border-zinc-500 border-t-transparent rounded-full\" />\n <span>Loading conversation...</span>\n </div>\n ) : (\n \"Start a conversation...\"\n )}\n </div>\n ) : (\n <>\n {renderedMessages}\n {/* Show HITL interrupt card when agent is paused for approval */}\n {!isLoading && stream.interrupt && interruptActions && (() => {\n const payload = stream.interrupt.value as any;\n const toolName = payload?.actionRequests?.[0]?.name;\n const InterruptComponent = toolName ? interruptComponents[toolName] : undefined;\n if (!InterruptComponent) return null;\n return <InterruptComponent interrupt={payload} actions={interruptActions} />;\n })()}\n {/* Show thinking indicator when loading and no AI response has started yet */}\n {isLoading && memoMessages.length > 0 && (() => {\n const lastMsg = memoMessages[memoMessages.length - 1];\n // Show if last message is human or if last AI has no content (only tool calls)\n return lastMsg.type === \"human\" ||\n (lastMsg.type === \"ai\" && !lastMsg.content && isAiWithToolCalls(lastMsg));\n })() && (\n <Thinking />\n )}\n </>\n )}\n\n </div>\n );\n}\n"],"names":["ChatBody","setIsFirstMessage","enableToolCallIndicator","chatBodyProps","stream","useStreamContext","interruptComponents","useCustomComponents","messages","isLoading","messageFeedback","setMessageFeedback","useState","logger","memoMessages","useMemo","containerRef","useRef","prevMessageCountRef","shouldAutoScrollRef","handleFeedback","useCallback","messageId","feedback","prev","handleRegenerate","parentCheckpoint","handleBranchSelect","branch","handleInterruptRespond","response","interruptActions","interrupt","actionRequests","reason","editedArgs","action","getToolCallsFromContent","content","c","tc","args","parsePartialJson","getScrollContainer","parent","style","useEffect","renderMessage","msg","index","messagesArray","isCurrentlyStreamingMessage","isAiWithToolCalls","msgKey","HumanMessage","isToolMessage","prevIndex","groupedTimelineMessages","nextIndex","nextMsg","groupedAiMessages","m","toolMessages","hasArrayContent","mergedContent","combinedContent","toolCallsFromContent","combinedMessage","meta","hasThinkingContent","b","hasKwargsReasoning","ak","hasKwargsToolStatus","hasToolCalls","hasAnyDisplayableContent","isLastMessageGroup","isStreamingThisMessage","showThinkingIndicator","jsxs","React","Thinking","jsx","AgentMessage","CustomComponentRender","renderedMessages","element","scrollContainer","handleScroll","scrollTop","scrollHeight","clientHeight","distanceFromBottom","currentCount","observer","useLayoutEffect","Fragment","payload","toolName","InterruptComponent","lastMsg"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,SAAwBA,GAAS,EAAE,mBAAAC,GAAmB,yBAAAC,IAA0B,IAAM,eAAAC,KAA0J;AAC9O,QAAMC,IAASC,GAAA,GACT,EAAE,qBAAAC,EAAA,IAAwBC,GAAA,GAC1BC,IAAWJ,EAAO,UAClBK,IAAYL,EAAO,WAGnB,CAACM,GAAiBC,CAAkB,IAAIC,GAA0C,CAAA,CAAE;AA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"],"sourcesContent":["import { useStreamContext } from \"@/providers/Stream\";\nimport { useCustomComponents } from \"@/providers/CustomComponentProvider\";\nimport type { chatBodyProps } from \"@/types/ChatProps\";\nimport { logger } from \"@/utils/logger\";\nimport { isAiWithToolCalls, isToolMessage } from \"@/utils/utils\";\nimport type { Message } from \"@langchain/langgraph-sdk\";\nimport type { TodoItem } from \"@/providers/Stream\";\nimport React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport AgentMessage from \"./messages/AgentMessage\";\nimport CustomComponentRender from \"./messages/CustomComponentRender\";\nimport HumanMessage from \"./messages/HumanMessage\";\nimport type { MessageFeedback } from \"./messages/MessageActions\";\nimport Thinking from \"./Thinking\";\n\nexport default function ChatBody({ setIsFirstMessage, enableToolCallIndicator = true, chatBodyProps }: { setIsFirstMessage?: React.Dispatch<React.SetStateAction<boolean>>, enableToolCallIndicator?: boolean, chatBodyProps?: chatBodyProps }) {\n const stream = useStreamContext();\n const { interruptComponents } = useCustomComponents();\n const messages = stream.messages;\n const isLoading = stream.isLoading;\n\n // State to track message feedback (likes/dislikes)\n const [messageFeedback, setMessageFeedback] = useState<Record<string, MessageFeedback>>({});\n\n logger.debug(\"ChatBody render - messages count:\", messages, \"isLoading:\", isLoading);\n\n // Memoize messages with stable reference\n const memoMessages = useMemo(() => messages ?? [], [messages]);\n\n const uiMessageIds = useMemo(() => {\n const ids = new Set<string>();\n const uiMessages = stream.values?.ui;\n if (!Array.isArray(uiMessages)) return ids;\n\n for (const ui of uiMessages) {\n const uiObj = ui as unknown as Record<string, unknown>;\n const metadata =\n uiObj.metadata && typeof uiObj.metadata === \"object\"\n ? (uiObj.metadata as Record<string, unknown>)\n : undefined;\n\n const candidates = [\n typeof uiObj.id === \"string\" ? uiObj.id : undefined,\n typeof metadata?.id === \"string\" ? metadata.id : undefined,\n typeof metadata?.message_id === \"string\" ? metadata.message_id : undefined,\n ];\n\n for (const candidate of candidates) {\n if (candidate) ids.add(candidate);\n }\n }\n\n return ids;\n }, [stream.values?.ui]);\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const prevMessageCountRef = useRef(0);\n const shouldAutoScrollRef = useRef(true);\n const frozenTodosByGroupRef = useRef<Map<string, TodoItem[]>>(new Map());\n\n const normalizeTodos = useCallback((todos: unknown): TodoItem[] => {\n if (!Array.isArray(todos)) return [];\n\n return todos\n .map((todo, index) => {\n if (!todo || typeof todo !== \"object\") return null;\n const t = todo as Record<string, unknown>;\n const status = t.status;\n if (\n typeof t.content !== \"string\" ||\n (status !== \"pending\" && status !== \"in_progress\" && status !== \"completed\")\n ) {\n return null;\n }\n\n return {\n id: t.id && typeof t.id === \"string\" ? t.id : `todo-${index}`,\n content: t.content,\n status,\n updatedAt: t.updatedAt instanceof Date || typeof t.updatedAt === \"string\" || typeof t.updatedAt === \"number\"\n ? (t.updatedAt as string | number | Date)\n : undefined,\n run_id: typeof t.run_id === \"string\" ? t.run_id : undefined,\n runId: typeof t.runId === \"string\" ? t.runId : undefined,\n messageId: typeof t.messageId === \"string\" ? t.messageId : undefined,\n checkpoint: typeof t.checkpoint === \"string\" ? t.checkpoint : undefined,\n } as TodoItem;\n })\n .filter((todo): todo is TodoItem => todo !== null);\n }, []);\n\n // Handler for message feedback\n const handleFeedback = useCallback((messageId: string, feedback: MessageFeedback) => {\n setMessageFeedback(prev => ({\n ...prev,\n [messageId]: feedback,\n }));\n }, []);\n\n // Handler for message regeneration\n const handleRegenerate = useCallback(async (\n parentCheckpoint: any | null | undefined,\n ) => {\n if (!parentCheckpoint) {\n console.error(\"No parent checkpoint available for regeneration\");\n return;\n }\n\n await stream.submit(undefined, {\n checkpoint: parentCheckpoint,\n streamMode: [\"values\"],\n streamSubgraphs: true,\n streamResumable: true,\n });\n }, [stream]);\n\n // Handler for selecting a different branch\n const handleBranchSelect = useCallback((branch: string) => {\n stream.setBranch(branch);\n }, [stream]);\n\n // Handler for HITL interrupt responses\n const handleInterruptRespond = useCallback((response: any) => {\n stream.submit(null, {\n command: { resume: response },\n streamMode: [\"values\", \"messages-tuple\", \"updates\", \"custom\"],\n streamSubgraphs: true,\n });\n }, [stream]);\n\n // Build interrupt actions for custom renderers\n const interruptActions = useMemo(() => {\n const interrupt = stream.interrupt;\n if (!interrupt) return null;\n const payload = interrupt.value as any;\n const actionRequests = payload?.actionRequests ?? [];\n return {\n approve: () => {\n handleInterruptRespond({\n decisions: actionRequests.map(() => ({ type: \"approve\" as const })),\n });\n },\n reject: (reason?: string) => {\n handleInterruptRespond({\n decisions: actionRequests.map(() => ({\n type: \"reject\" as const,\n message: reason || undefined,\n })),\n });\n },\n edit: (editedArgs: Record<string, unknown>) => {\n const action = actionRequests[0];\n handleInterruptRespond({\n decisions: [\n {\n type: \"edit\" as const,\n editedAction: {\n name: action?.name ?? \"\",\n args: { ...action?.args, ...editedArgs },\n },\n },\n ],\n });\n },\n };\n }, [stream.interrupt, handleInterruptRespond]);\n\n // Get the parent scroll container\n const getScrollContainer = useCallback(() => {\n if (containerRef.current) {\n // Find the parent with overflow-y-auto class\n let parent = containerRef.current.parentElement;\n while (parent) {\n const style = window.getComputedStyle(parent);\n if (style.overflowY === 'auto' || style.overflowY === 'scroll') {\n return parent;\n }\n parent = parent.parentElement;\n }\n }\n return null;\n }, []);\n\n useEffect(() => {\n if (memoMessages.length > 0 && setIsFirstMessage) {\n setIsFirstMessage(false);\n }\n }, [memoMessages.length, setIsFirstMessage]);\n\n // Memoize message rendering logic to prevent unnecessary re-renders\n const renderMessage = useCallback((msg: typeof messages[0], index: number, messagesArray: typeof messages) => {\n const isCurrentlyStreamingMessage = isLoading && index === messagesArray.length - 1 && msg.type === \"ai\";\n if (!msg.content.length && !isAiWithToolCalls(msg) && !isCurrentlyStreamingMessage) return null;\n\n if (msg.additional_kwargs?.hidden) {\n return null;\n }\n\n // Use message id or fallback to index for key\n const msgKey = msg.id ?? `msg-${index}`;\n const hasCustomComponentForMessage = (message: Message) =>\n typeof message.id === \"string\" && uiMessageIds.has(message.id);\n\n if (msg.type === \"human\") {\n return <HumanMessage key={msgKey} message={msg} fontSize={chatBodyProps?.fontSize} />;\n }\n\n // Skip standalone tool messages\n if (isToolMessage(msg)) {\n return null;\n }\n\n // Skip if this AI message was already combined with a previous one\n if (msg.type === \"ai\" && index > 0) {\n // Check if previous non-tool message is also an AI message\n let prevIndex = index - 1;\n while (prevIndex >= 0 && isToolMessage(messagesArray[prevIndex])) {\n prevIndex--;\n }\n\n if (prevIndex >= 0 && messagesArray[prevIndex].type === \"ai\") {\n // Only render separately if THIS message owns custom UI (needs its own group).\n // Otherwise it was already consumed by the previous group's forward scan.\n const currentHasCustomUi = hasCustomComponentForMessage(msg);\n if (!currentHasCustomUi) {\n return null;\n }\n }\n }\n\n const groupedTimelineMessages: Message[] = [msg];\n let nextIndex = index + 1;\n\n while (nextIndex < messagesArray.length) {\n const nextMsg = messagesArray[nextIndex];\n\n if (isToolMessage(nextMsg)) {\n groupedTimelineMessages.push(nextMsg);\n nextIndex++;\n } else if (nextMsg.type === \"ai\") {\n if (hasCustomComponentForMessage(nextMsg)) {\n // Sub-agent/custom UI messages should be rendered in their own section\n // to avoid parent-bubble flicker and reparenting during streaming.\n break;\n }\n groupedTimelineMessages.push(nextMsg);\n nextIndex++;\n } else {\n // Stop at human messages or other types\n break;\n }\n }\n\n const groupedAiMessages = groupedTimelineMessages.filter((m) => m.type === \"ai\");\n\n // Merge content from all AI messages, preserving reasoning blocks.\n // Deduplicate identical text content (subgraph messages can duplicate parent messages).\n const hasArrayContent = groupedAiMessages.some((m) => Array.isArray(m.content));\n const seenTexts = new Set<string>();\n const mergedContent: Message[\"content\"] = hasArrayContent\n ? groupedAiMessages.flatMap((m) => {\n if (Array.isArray(m.content)) {\n return (m.content as any[]).filter((block: any) => {\n if (block.type === \"text\" && typeof block.text === \"string\") {\n if (seenTexts.has(block.text)) return false;\n seenTexts.add(block.text);\n }\n return true;\n });\n }\n if (typeof m.content === \"string\" && m.content.length > 0) {\n if (seenTexts.has(m.content)) return [];\n seenTexts.add(m.content);\n return [{ type: \"text\", text: m.content }];\n }\n return [];\n })\n : (() => {\n const unique: string[] = [];\n for (const m of groupedAiMessages) {\n const text = typeof m.content === \"string\" ? m.content : \"\";\n if (text && !seenTexts.has(text)) {\n seenTexts.add(text);\n unique.push(text);\n }\n }\n return unique.join(\"\\n\\n\");\n })();\n\n // Extract plain-text portion for legacy checks\n const combinedContent = hasArrayContent\n ? (mergedContent as any[])\n .map((c: any) => (c.type === \"text\" ? (c.text as string) : \"\"))\n .filter(Boolean)\n .join(\" \")\n : (mergedContent as string);\n\n // Create a combined message object preserving full content (including thinking blocks)\n const combinedMessage = {\n ...msg,\n content: mergedContent,\n };\n\n // Get branch metadata from thread\n const meta = msg ? stream.getMessagesMetadata(msg) : undefined;\n\n // Determine if there is any displayable content (text OR thinking/reasoning blocks)\n const hasThinkingContent = hasArrayContent\n ? (mergedContent as any[]).some(\n (b: any) =>\n (b.type === \"thinking\" && (b.thinking as string)?.length > 0) ||\n (b.type === \"reasoning\" && (b.reasoning as string)?.length > 0),\n )\n : false;\n const hasKwargsReasoning =\n groupedAiMessages.some((m) => {\n const ak = (m as Record<string, unknown>).additional_kwargs as Record<string, unknown> | undefined;\n return typeof ak?.reasoning_content === \"string\" && (ak.reasoning_content as string).length > 0;\n });\n\n const hasKwargsToolStatus = groupedAiMessages.some((m) => {\n const ak = (m as Record<string, unknown>).additional_kwargs as Record<string, unknown> | undefined;\n return Array.isArray(ak?.tool_status) && (ak.tool_status as unknown[]).length > 0;\n });\n const hasToolMessages = groupedTimelineMessages.some((m) => isToolMessage(m));\n const hasToolCalls = enableToolCallIndicator && (\n groupedAiMessages.some((m) => isAiWithToolCalls(m)) ||\n hasKwargsToolStatus ||\n hasToolMessages\n );\n const hasAnyDisplayableContent =\n !!combinedContent ||\n hasThinkingContent ||\n hasKwargsReasoning ||\n hasToolCalls;\n\n const isLastMessageGroup = nextIndex >= messagesArray.length;\n const isStreamingThisMessage = isLoading && isLastMessageGroup;\n\n const groupKey = groupedAiMessages\n .map((m) => m.id)\n .filter((id): id is string => typeof id === \"string\" && id.length > 0)\n .join(\"|\") || msgKey;\n\n const todosForGroup = (() => {\n const frozen = frozenTodosByGroupRef.current.get(groupKey);\n if (!isStreamingThisMessage && frozen && frozen.length > 0) {\n return frozen;\n }\n\n if (isStreamingThisMessage) {\n const live = normalizeTodos(stream.values?.todos);\n if (live.length > 0) {\n frozenTodosByGroupRef.current.set(groupKey, live);\n return live;\n }\n }\n\n for (let i = groupedAiMessages.length - 1; i >= 0; i--) {\n const aiMeta = stream.getMessagesMetadata(groupedAiMessages[i]);\n const aiValues = aiMeta?.firstSeenState?.values as { todos?: unknown } | undefined;\n const snapshot = normalizeTodos(aiValues?.todos);\n if (snapshot.length > 0) {\n if (!frozen || frozen.length === 0) {\n frozenTodosByGroupRef.current.set(groupKey, snapshot);\n }\n return frozen ?? snapshot;\n }\n }\n\n if (frozen && frozen.length > 0) {\n return frozen;\n }\n\n return [];\n })();\n\n // Show Thinking animation whenever streaming with no displayable content yet (plain chat or tool-call)\n const showThinkingIndicator = isStreamingThisMessage && !hasAnyDisplayableContent;\n\n return (\n <React.Fragment key={msgKey}>\n {/* 1. Thinking indicator - show when streaming with no content yet (no icon shown) */}\n {showThinkingIndicator && (\n <Thinking />\n )}\n {/* 2. Agent message — pass full mergedContent and grouped timeline for in-order rendering */}\n {hasAnyDisplayableContent && (\n <AgentMessage\n agentName={chatBodyProps?.agentName}\n fontSize={chatBodyProps?.fontSize}\n message={combinedMessage}\n groupedMessages={groupedTimelineMessages}\n showToolActivity={enableToolCallIndicator}\n isStreaming={isStreamingThisMessage}\n onRegenerate={handleRegenerate}\n feedback={msg.id ? messageFeedback[msg.id] : undefined}\n onFeedback={handleFeedback}\n branch={meta?.branch}\n branchOptions={meta?.branchOptions}\n onBranchSelect={handleBranchSelect}\n todos={todosForGroup}\n />\n )}\n {/* 3. Custom component (from all messages in the group) */}\n {groupedAiMessages.map((m) => (\n <CustomComponentRender key={m.id} message={m} thread={stream} />\n ))}\n </React.Fragment>\n );\n }, [isLoading, stream, normalizeTodos, enableToolCallIndicator, handleRegenerate, messageFeedback, handleFeedback, handleBranchSelect, uiMessageIds]);\n\n // Memoize the rendered messages array\n const renderedMessages = useMemo(() => {\n return memoMessages.map((msg, index) => {\n const element = renderMessage(msg, index, memoMessages);\n // Ensure every element has a key, using message id or fallback to index\n if (element && !element.key) {\n return React.cloneElement(element, { key: msg.id ?? `msg-${index}` });\n }\n return element;\n });\n }, [memoMessages, renderMessage]);\n\n // Track user scroll position to determine if we should auto-scroll\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer) return;\n\n const handleScroll = () => {\n const { scrollTop, scrollHeight, clientHeight } = scrollContainer;\n const distanceFromBottom = scrollHeight - scrollTop - clientHeight;\n // Consider \"at bottom\" if within 100px\n shouldAutoScrollRef.current = distanceFromBottom < 100;\n };\n\n scrollContainer.addEventListener('scroll', handleScroll);\n return () => scrollContainer.removeEventListener('scroll', handleScroll);\n }, [getScrollContainer]);\n\n // Auto-scroll when new messages are added\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer) return;\n\n const currentCount = memoMessages.length;\n const hasNewMessage = currentCount > prevMessageCountRef.current;\n\n if (hasNewMessage) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n shouldAutoScrollRef.current = true;\n }\n\n prevMessageCountRef.current = currentCount;\n }, [memoMessages, getScrollContainer]);\n\n // Use MutationObserver to detect DOM changes and auto-scroll during streaming\n useEffect(() => {\n const scrollContainer = getScrollContainer();\n if (!scrollContainer || !isLoading) return;\n\n const observer = new MutationObserver(() => {\n if (shouldAutoScrollRef.current && scrollContainer) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n }\n });\n\n // Observe the ChatBody container for changes\n if (containerRef.current) {\n observer.observe(containerRef.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n }\n\n return () => observer.disconnect();\n }, [isLoading, getScrollContainer]);\n\n // Use useLayoutEffect to scroll after DOM updates\n useLayoutEffect(() => {\n const scrollContainer = getScrollContainer();\n if (isLoading && shouldAutoScrollRef.current && scrollContainer) {\n scrollContainer.scrollTop = scrollContainer.scrollHeight;\n }\n });\n\n return (\n <div\n ref={containerRef}\n className=\"flex flex-col gap-4 rounded-4xl p-2\"\n >\n {memoMessages.length === 0 ? (\n <div className=\"flex items-center justify-center h-full text-zinc-500\">\n {isLoading ? (\n <div className=\"flex items-center gap-2\">\n <div className=\"animate-spin h-5 w-5 border-2 border-zinc-500 border-t-transparent rounded-full\" />\n <span>Loading conversation...</span>\n </div>\n ) : (\n \"Start a conversation...\"\n )}\n </div>\n ) : (\n <>\n {renderedMessages}\n {/* Show HITL interrupt card when agent is paused for approval */}\n {/* Show thinking indicator when loading and last message is human (no AI response yet) */}\n {isLoading && memoMessages.length > 0 &&\n memoMessages[memoMessages.length - 1].type === \"human\" && (\n <Thinking />\n )}\n {!isLoading && stream.interrupt && interruptActions && (() => {\n const payload = stream.interrupt.value as any;\n const toolName = payload?.actionRequests?.[0]?.name;\n const InterruptComponent = toolName ? interruptComponents[toolName] : undefined;\n if (!InterruptComponent) return null;\n return <InterruptComponent interrupt={payload} actions={interruptActions} />;\n })()}\n </>\n )}\n\n </div>\n );\n}\n"],"names":["ChatBody","setIsFirstMessage","enableToolCallIndicator","chatBodyProps","stream","useStreamContext","interruptComponents","useCustomComponents","messages","isLoading","messageFeedback","setMessageFeedback","useState","logger","memoMessages","useMemo","uiMessageIds","ids","uiMessages","ui","uiObj","metadata","candidates","candidate","containerRef","useRef","prevMessageCountRef","shouldAutoScrollRef","frozenTodosByGroupRef","normalizeTodos","useCallback","todos","todo","index","t","status","handleFeedback","messageId","feedback","prev","handleRegenerate","parentCheckpoint","handleBranchSelect","branch","handleInterruptRespond","response","interruptActions","interrupt","actionRequests","reason","editedArgs","action","getScrollContainer","parent","style","useEffect","renderMessage","msg","messagesArray","isCurrentlyStreamingMessage","isAiWithToolCalls","msgKey","hasCustomComponentForMessage","message","HumanMessage","isToolMessage","prevIndex","groupedTimelineMessages","nextIndex","nextMsg","groupedAiMessages","m","hasArrayContent","seenTexts","mergedContent","block","unique","text","combinedContent","c","combinedMessage","meta","hasThinkingContent","b","hasKwargsReasoning","ak","hasKwargsToolStatus","hasToolMessages","hasToolCalls","hasAnyDisplayableContent","isLastMessageGroup","isStreamingThisMessage","groupKey","id","todosForGroup","frozen","live","i","aiValues","snapshot","showThinkingIndicator","jsxs","React","Thinking","jsx","AgentMessage","CustomComponentRender","renderedMessages","element","scrollContainer","handleScroll","scrollTop","scrollHeight","clientHeight","distanceFromBottom","currentCount","observer","useLayoutEffect","Fragment","payload","toolName","InterruptComponent"],"mappings":";;;;;;;;;;AAcA,SAAwBA,GAAS,EAAE,mBAAAC,GAAmB,yBAAAC,IAA0B,IAAM,eAAAC,KAA0J;AAC9O,QAAMC,IAASC,GAAA,GACT,EAAE,qBAAAC,EAAA,IAAwBC,GAAA,GAC1BC,IAAWJ,EAAO,UAClBK,IAAYL,EAAO,WAGnB,CAACM,GAAiBC,CAAkB,IAAIC,GAA0C,CAAA,CAAE;AAE1F,EAAAC,GAAO,MAAM,qCAAqCL,GAAU,cAAcC,CAAS;AAGnF,QAAMK,IAAeC,EAAQ,MAAMP,KAAY,CAAA,GAAI,CAACA,CAAQ,CAAC,GAEvDQ,IAAeD,EAAQ,MAAM;AACjC,UAAME,wBAAU,IAAA,GACVC,IAAad,EAAO,QAAQ;AAClC,QAAI,CAAC,MAAM,QAAQc,CAAU,EAAG,QAAOD;AAEvC,eAAWE,KAAMD,GAAY;AAC3B,YAAME,IAAQD,GACRE,IACJD,EAAM,YAAY,OAAOA,EAAM,YAAa,WACvCA,EAAM,WACP,QAEAE,IAAa;AAAA,QACjB,OAAOF,EAAM,MAAO,WAAWA,EAAM,KAAK;AAAA,QAC1C,OAAOC,GAAU,MAAO,WAAWA,EAAS,KAAK;AAAA,QACjD,OAAOA,GAAU,cAAe,WAAWA,EAAS,aAAa;AAAA,MAAA;AAGnE,i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AMyE,IAAUnH,EAAO,UAAU,OAC3BoH,IAAWD,GAAS,iBAAiB,CAAC,GAAG,MACzCE,IAAqBD,IAAWlH,EAAoBkH,CAAQ,IAAI;AACtE,iBAAKC,IACE,gBAAAjB,EAACiB,GAAA,EAAmB,WAAWF,GAAS,SAASzE,GAAkB,IAD1C;AAAA,QAElC,GAAA;AAAA,MAAG,EAAA,CACL;AAAA,IAAA;AAAA,EAAA;AAKR;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),t=require("lucide-react"),o={completed:{icon:t.CheckCircle2,iconClass:"text-emerald-400",textClass:"text-zinc-400 line-through"},in_progress:{icon:t.Loader2,iconClass:"text-blue-400 animate-spin",textClass:"text-zinc-100"},pending:{icon:t.Circle,iconClass:"text-zinc-500",textClass:"text-zinc-400"}};function d({todos:n}){if(!n.length)return null;const c=n.filter(s=>s.status==="completed").length,l=n.find(s=>s.status==="in_progress"),r=Math.round(c/n.length*100);return e.jsxs("div",{className:"mb-3 w-full max-w-full rounded-2xl border border-zinc-700/60 bg-zinc-950/35 px-4 py-3.5 shadow-[0_10px_30px_rgba(0,0,0,0.25)] backdrop-blur-sm",children:[e.jsxs("div",{className:"mb-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 text-zinc-200",children:[e.jsx(t.Sparkles,{className:"h-3.5 w-3.5 text-cyan-300/90"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-zinc-300",children:"Agent Plan"})]}),e.jsx("p",{className:"mt-1 truncate text-xs text-zinc-400",children:l?`Now: ${l.content}`:"Wrapping up remaining steps"})]}),e.jsxs("div",{className:"rounded-lg border border-zinc-700/80 bg-zinc-900/70 px-2.5 py-1 text-[11px] font-medium text-zinc-300",children:[c,"/",n.length," done"]})]}),e.jsx("div",{className:"mb-3 h-1.5 overflow-hidden rounded-full bg-zinc-800/80",children:e.jsx("div",{className:"h-full rounded-full bg-linear-to-r from-cyan-400 to-emerald-400 transition-all duration-500",style:{width:`${r}%`}})}),e.jsx("ul",{className:"space-y-1.5",children:n.map(s=>{const i=o[s.status],a=i.icon;return e.jsxs("li",{className:"group flex items-center gap-2 rounded-lg border border-zinc-800/80 bg-zinc-900/45 px-2.5 py-2 transition-colors duration-200 hover:border-zinc-700/80",children:[e.jsx(a,{className:`h-3.5 w-3.5 flex-shrink-0 ${i.iconClass}`}),e.jsx("span",{className:`line-clamp-1 text-xs ${i.textClass}`,children:s.content})]},s.id)})})]})}module.exports=d;
|
|
2
|
+
//# sourceMappingURL=TodoList.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoList.cjs.js","sources":["../../src/components/TodoList.tsx"],"sourcesContent":["import type { TodoItem } from \"@/providers/Stream\";\nimport { CheckCircle2, Circle, Loader2, Sparkles } from \"lucide-react\";\n\nconst statusConfig = {\n completed: {\n icon: CheckCircle2,\n iconClass: \"text-emerald-400\",\n textClass: \"text-zinc-400 line-through\",\n },\n in_progress: {\n icon: Loader2,\n iconClass: \"text-blue-400 animate-spin\",\n textClass: \"text-zinc-100\",\n },\n pending: {\n icon: Circle,\n iconClass: \"text-zinc-500\",\n textClass: \"text-zinc-400\",\n },\n} as const;\n\nexport default function TodoList({ todos }: { todos: TodoItem[] }) {\n if (!todos.length) return null;\n\n const completed = todos.filter((t) => t.status === \"completed\").length;\n const inProgress = todos.find((t) => t.status === \"in_progress\");\n const percentage = Math.round((completed / todos.length) * 100);\n\n return (\n <div className=\"mb-3 w-full max-w-full rounded-2xl border border-zinc-700/60 bg-zinc-950/35 px-4 py-3.5 shadow-[0_10px_30px_rgba(0,0,0,0.25)] backdrop-blur-sm\">\n <div className=\"mb-3 flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2 text-zinc-200\">\n <Sparkles className=\"h-3.5 w-3.5 text-cyan-300/90\" />\n <span className=\"text-xs font-semibold uppercase tracking-[0.14em] text-zinc-300\">Agent Plan</span>\n </div>\n <p className=\"mt-1 truncate text-xs text-zinc-400\">\n {inProgress ? `Now: ${inProgress.content}` : \"Wrapping up remaining steps\"}\n </p>\n </div>\n <div className=\"rounded-lg border border-zinc-700/80 bg-zinc-900/70 px-2.5 py-1 text-[11px] font-medium text-zinc-300\">\n {completed}/{todos.length} done\n </div>\n </div>\n\n <div className=\"mb-3 h-1.5 overflow-hidden rounded-full bg-zinc-800/80\">\n <div\n className=\"h-full rounded-full bg-linear-to-r from-cyan-400 to-emerald-400 transition-all duration-500\"\n style={{ width: `${percentage}%` }}\n />\n </div>\n\n <ul className=\"space-y-1.5\">\n {todos.map((todo) => {\n const config = statusConfig[todo.status];\n const Icon = config.icon;\n return (\n <li\n key={todo.id}\n className=\"group flex items-center gap-2 rounded-lg border border-zinc-800/80 bg-zinc-900/45 px-2.5 py-2 transition-colors duration-200 hover:border-zinc-700/80\"\n >\n <Icon className={`h-3.5 w-3.5 flex-shrink-0 ${config.iconClass}`} />\n <span className={`line-clamp-1 text-xs ${config.textClass}`}>\n {todo.content}\n </span>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"names":["statusConfig","CheckCircle2","Loader2","Circle","TodoList","todos","completed","t","inProgress","percentage","jsxs","jsx","Sparkles","todo","config","Icon"],"mappings":"4EAGMA,EAAe,CACnB,UAAW,CACT,KAAMC,EAAAA,aACN,UAAW,mBACX,UAAW,4BAAA,EAEb,YAAa,CACX,KAAMC,EAAAA,QACN,UAAW,6BACX,UAAW,eAAA,EAEb,QAAS,CACP,KAAMC,EAAAA,OACN,UAAW,gBACX,UAAW,eAAA,CAEf,EAEA,SAAwBC,EAAS,CAAE,MAAAC,GAAgC,CACjE,GAAI,CAACA,EAAM,OAAQ,OAAO,KAE1B,MAAMC,EAAYD,EAAM,OAAQE,GAAMA,EAAE,SAAW,WAAW,EAAE,OAC1DC,EAAaH,EAAM,KAAME,GAAMA,EAAE,SAAW,aAAa,EACzDE,EAAa,K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