chore: update @typescript/native-preview and vue-tsgo versions#1640
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughBumps package/development dependencies and packageManager; syncs many ACP registry agent versions/distributions; tightens virtual model typing; refactors resetEditor, input normalization, reasoning/verbosity typings, pending-interaction block types, and message reasoning-time normalization. ChangesRenderer typing & UI changes
package.json updates
ACP registry updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/renderer/src/components/message/MessageBlockThink.vue (1)
11-176:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Oxfmt violations blocking CI.
oxfmt --checkis failing for this file in CI, so formatting needs to be applied before merge.As per coding guidelines,
src/**/*.{ts,tsx,js,jsx,vue}must "Use Oxfmt formatting with single quotes, no semicolons, and width 100; runpnpm run format".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/src/components/message/MessageBlockThink.vue` around lines 11 - 176, This file (MessageBlockThink.vue) fails Oxfmt checks; run the project formatter to apply the required style (single quotes, no semicolons, width 100) by executing the repo formatting script (pnpm run format) or invoking oxfmt with those options, then commit the changed file; locate the component by the top-level script block and symbols such as updateDisplayedSeconds, scheduleNextUpdate, stopTimer, and the createConfigClient usage to ensure the generated formatting changes are applied across the script section consistently.src/renderer/src/components/chat/ChatStatusBar.vue (1)
885-2978:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix Oxfmt violations blocking CI.
oxfmt --checkis failing for this file in CI, so this PR cannot pass build-check until formatting is applied.As per coding guidelines,
src/**/*.{ts,tsx,js,jsx,vue}must "Use Oxfmt formatting with single quotes, no semicolons, and width 100; runpnpm run format".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/renderer/src/components/chat/ChatStatusBar.vue` around lines 885 - 2978, The file ChatStatusBar.vue fails oxfmt checks; run the project formatter to fix style (single quotes, no semicolons, width 100) and commit the formatted file: run pnpm run format (or oxfmt with the repo config) and re-run oxfmt --check; ensure the script block (script setup lang="ts") and exported symbols like changeModelSelection, syncGenerationSettings, updateLocalGenerationSettings, and resolveDefaultGenerationSettings are preserved while applying the formatting changes, then commit the updated ChatStatusBar.vue so CI passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/renderer/src/components/message/MessageBlockThink.vue`:
- Around line 46-56: The toReasoningTimeRange function currently accepts
start/end when typeof === 'number', which allows NaN/Infinity; update to
validate that both value.start and value.end are finite numbers using
Number.isFinite (or an equivalent finite-check) before returning { start, end }
and otherwise return null so downstream timer scheduling (e.g., code using
ReasoningTimeRange) never receives non-finite delays; locate and change the
checks in toReasoningTimeRange (and any similar conversions of
DisplayAssistantMessageBlock['reasoning_time']) to use the finite-number guard.
---
Outside diff comments:
In `@src/renderer/src/components/chat/ChatStatusBar.vue`:
- Around line 885-2978: The file ChatStatusBar.vue fails oxfmt checks; run the
project formatter to fix style (single quotes, no semicolons, width 100) and
commit the formatted file: run pnpm run format (or oxfmt with the repo config)
and re-run oxfmt --check; ensure the script block (script setup lang="ts") and
exported symbols like changeModelSelection, syncGenerationSettings,
updateLocalGenerationSettings, and resolveDefaultGenerationSettings are
preserved while applying the formatting changes, then commit the updated
ChatStatusBar.vue so CI passes.
In `@src/renderer/src/components/message/MessageBlockThink.vue`:
- Around line 11-176: This file (MessageBlockThink.vue) fails Oxfmt checks; run
the project formatter to apply the required style (single quotes, no semicolons,
width 100) by executing the repo formatting script (pnpm run format) or invoking
oxfmt with those options, then commit the changed file; locate the component by
the top-level script block and symbols such as updateDisplayedSeconds,
scheduleNextUpdate, stopTimer, and the createConfigClient usage to ensure the
generated formatting changes are applied across the script section consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 23d9541c-d56b-4c6a-bb4e-108245810283
📒 Files selected for processing (9)
package.jsonresources/acp-registry/registry.jsonresources/model-db/providers.jsonsrc/renderer/settings/components/RemoteSettings.vuesrc/renderer/src/components/chat/ChatSearchBar.vuesrc/renderer/src/components/chat/ChatStatusBar.vuesrc/renderer/src/components/chat/ChatToolInteractionOverlay.vuesrc/renderer/src/components/message/MessageBlockThink.vuesrc/renderer/src/pages/ChatPage.vue
✅ Files skipped from review due to trivial changes (2)
- src/renderer/src/components/chat/ChatToolInteractionOverlay.vue
- src/renderer/src/pages/ChatPage.vue
| const toReasoningTimeRange = ( | ||
| value: DisplayAssistantMessageBlock['reasoning_time'] | ||
| ): ReasoningTimeRange | null => { | ||
| if (!value || typeof value !== 'object') { | ||
| return null | ||
| } | ||
|
|
||
| return typeof value.start === 'number' && typeof value.end === 'number' | ||
| ? { start: value.start, end: value.end } | ||
| : null | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n src/renderer/src/components/message/MessageBlockThink.vue | head -150Repository: ThinkInAIXYZ/deepchat
Length of output: 5041
🏁 Script executed:
# Check if the file exists and get its size
wc -l src/renderer/src/components/message/MessageBlockThink.vueRepository: ThinkInAIXYZ/deepchat
Length of output: 127
🏁 Script executed:
# Search for scheduleNextUpdate and delay calculations
rg -n "scheduleNextUpdate|delay" src/renderer/src/components/message/MessageBlockThink.vue -A 5 -B 2Repository: ThinkInAIXYZ/deepchat
Length of output: 898
🏁 Script executed:
# Look for how reasoningTimeRange is used
rg -n "reasoningTimeRange" src/renderer/src/components/message/MessageBlockThink.vue -A 3 -B 1Repository: ThinkInAIXYZ/deepchat
Length of output: 780
🏁 Script executed:
# Check formatting issues - run oxfmt check on the file
rg -n "const toReasoningTimeRange\|const isFiniteNumber" src/renderer/src/components/message/MessageBlockThink.vue -A 10Repository: ThinkInAIXYZ/deepchat
Length of output: 47
🏁 Script executed:
# Double-check JavaScript behavior with NaN
node <<'EOF'
console.log('typeof NaN:', typeof NaN)
console.log('typeof Infinity:', typeof Infinity)
console.log('NaN.toFixed(2) throws:', (() => { try { NaN.toFixed(2) } catch(e) { return e.name } })())
console.log('NaN - 100:', NaN - 100)
console.log('Math.max(0, NaN):', Math.max(0, NaN))
console.log('setTimeout with NaN delay:', 'fires immediately (coerced to 0)')
EOFRepository: ThinkInAIXYZ/deepchat
Length of output: 238
Validate reasoning timestamps as finite numbers before scheduling timers.
typeof value.start === 'number' allows NaN and Infinity, which propagate into timer delay calculations and cause immediate timer firing instead of proper scheduling intervals.
Proposed fix
const toReasoningTimeRange = (
value: DisplayAssistantMessageBlock['reasoning_time']
): ReasoningTimeRange | null => {
if (!value || typeof value !== 'object') {
return null
}
- return typeof value.start === 'number' && typeof value.end === 'number'
- ? { start: value.start, end: value.end }
- : null
+ const isFiniteNumber = (input: unknown): input is number =>
+ typeof input === 'number' && Number.isFinite(input)
+
+ return isFiniteNumber(value.start) && isFiniteNumber(value.end) && value.end >= value.start
+ ? { start: value.start, end: value.end }
+ : null
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const toReasoningTimeRange = ( | |
| value: DisplayAssistantMessageBlock['reasoning_time'] | |
| ): ReasoningTimeRange | null => { | |
| if (!value || typeof value !== 'object') { | |
| return null | |
| } | |
| return typeof value.start === 'number' && typeof value.end === 'number' | |
| ? { start: value.start, end: value.end } | |
| : null | |
| } | |
| const toReasoningTimeRange = ( | |
| value: DisplayAssistantMessageBlock['reasoning_time'] | |
| ): ReasoningTimeRange | null => { | |
| if (!value || typeof value !== 'object') { | |
| return null | |
| } | |
| const isFiniteNumber = (input: unknown): input is number => | |
| typeof input === 'number' && Number.isFinite(input) | |
| return isFiniteNumber(value.start) && isFiniteNumber(value.end) && value.end >= value.start | |
| ? { start: value.start, end: value.end } | |
| : null | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/renderer/src/components/message/MessageBlockThink.vue` around lines 46 -
56, The toReasoningTimeRange function currently accepts start/end when typeof
=== 'number', which allows NaN/Infinity; update to validate that both
value.start and value.end are finite numbers using Number.isFinite (or an
equivalent finite-check) before returning { start, end } and otherwise return
null so downstream timer scheduling (e.g., code using ReasoningTimeRange) never
receives non-finite delays; locate and change the checks in toReasoningTimeRange
(and any similar conversions of DisplayAssistantMessageBlock['reasoning_time'])
to use the finite-number guard.
Summary by CodeRabbit
Chores
Bug Fixes
Improvements