Skip to content

[BUG] TypeError: Cannot read properties of undefined (reading 'trim') #11752

@c-sunc6

Description

@c-sunc6

Problem (one or two sentences)

TypeError: Cannot read properties of undefined (reading 'trim')
at inputValue.trim (../../../../webview-ui/src/components/chat/ChatTextArea.tsx:262:21)
at ti (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:172:118)
at useMemo (../../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js:26:47)
at inputValue.trim (../../../../webview-ui/src/components/chat/ChatTextArea.tsx:261:26)
at Nh (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:160:136)
at Yi (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:192:56)
at f,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:293:274)
at tj (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:279:388)
at tj (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:279:319)
at tj (../../../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js:279:179)
组件堆栈:

at https://vscode-remote+attached-002dcontainer-002b7b22636f6e7461696e65724e616d65223a222f73696d5f7632227d.vscode-resource.vscode-cdn.net/root/.vscode-server/extensions/rooveterinaryinc.roo-cline-3.50.5/webview-ui/build/assets/index.js:2743:207656
at div

at alo (../../../../webview-ui/src/components/chat/ChatView.tsx:69:3)
at wbo (../../../../webview-ui/src/App.tsx:69:5)
at d (../../../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.23_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs:27:14)
at H3t (../../../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.6_@types+react-dom@18.3.7_@types+react@18.3.23__@types+reac_99504aa956c623e0884a4e3cb215669a/node_modules/@radix-ui/react-tooltip/dist/index.mjs:29:4)
at _3 (../../../../webview-ui/src/components/ui/tooltip.tsx:8:47704)
at B6t (../../../../node_modules/.pnpm/@TanStack+react-query@5.76.1_react@18.3.1/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:20:2)
at sHt (../../../../webview-ui/src/i18n/TranslationContext.tsx:16:70)
at nHt (../../../../webview-ui/src/context/ExtensionStateContext.tsx:192:86)
at mbo (../../../../webview-ui/src/components/ErrorBoundary.tsx:18:2)
at i (../../../../node_modules/.pnpm/react-i18next@15.5.1_i18next@25.2.1_typescript@5.8.3__react-dom@18.3.1_react@18.3.1__react@18.3.1_typescript@5.8.3/node_modules/react-i18next/dist/es/withTranslation.js:6:4)
at _bo (../../../../webview-ui/src/App.tsx:319:25)

Context (who is affected and when)

TypeError: Cannot read properties of undefined (reading 'trim')

Reproduction steps

13.log

Expected result

12

Actual result

21

Variations tried (optional)

插件不能使用

App Version

(v3.50.5)

API Provider (optional)

OpenAI Compatible

Model Used (optional)

No response

Roo Code Task Links (optional)

No response

Relevant logs or errors (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions