Skip to content

Conversation

@deepinfect
Copy link
Collaborator

@deepinfect deepinfect commented Oct 19, 2025

new toolcall ui

Summary by CodeRabbit

  • New Features

    • Enhanced message content rendering with improved handling of thinking blocks, artifacts, and tool calls for clearer visual organization.
  • Bug Fixes

    • Fixed minimap interaction handling to properly enable/disable click and hover events.
  • Style

    • Adjusted padding and height spacing across multiple components for improved visual consistency.
    • Refined typography spacing and margins for better readability in content blocks.

@deepinfect deepinfect marked this pull request as ready for review October 19, 2025 14:20
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 19, 2025

Walkthrough

This PR applies styling refinements and component structure adjustments across multiple message renderer components. Changes include padding and height modifications via utility classes, CSS margin rules for prose elements, a rework of message content rendering with conditional blocks for different content types (thinking, artifact, tool_call), simplified tool call headers using computed properties, spacing adjustments, pointer-events behavior modifications, and explicit margin rules for typography.

Changes

Cohort / File(s) Change Summary
Padding and Height Adjustments
src/renderer/src/components/SearchStatusIndicator.vue, src/renderer/src/components/message/MessageItemAssistant.vue
Replaced px-2 with py-1.5 and added min-h-7; removed scoped style block for min-height and padding. Changed spacing class from space-y-2 to gap-1.5 in else branch.
Margin and Spacing Styles
src/renderer/src/components/markdown/MarkdownRenderer.vue, src/renderer/src/components/think-content/ThinkContent.vue
Added @apply my-0 to paragraph elements within .prose container. Removed mt-[6px] from NodeRenderer wrapper and added explicit margin rules for prose elements (.think-prose p, ul, li).
Message Content Rendering Refactor
src/renderer/src/components/message/MessageBlockContent.vue
Replaced single container with direct v-for iteration over processedContent; introduced conditional blocks for part.type (text, thinking, artifact, tool_call). Added loading prop to MarkdownRenderer; renders ArtifactThinking, ArtifactPreview, and ToolCallPreview conditionally. Removed outer div wrapper and associated ref.
Tool Call UI Simplification
src/renderer/src/components/message/MessageBlockToolCall.vue
Replaced multi-part header with simplified inline icon and label row. Introduced computed properties (statusVariant, primaryLabel, functionLabel, statusIconName, statusIconClass) for compact header rendering. Replaced conditional status logic with computed icon determination.
Interaction Layer Changes
src/renderer/src/components/message/MessageMinimap.vue
Changed outer container from pointer-events-auto to pointer-events-none; inner bar container explicitly enables pointer-events-auto, affecting interactive hit-testing on minimap.

Sequence Diagram(s)

sequenceDiagram
    participant Template as MessageBlockContent Template
    participant Store as ArtifactStore
    participant Children as Child Components
    
    rect rgb(230, 245, 255)
    Note over Template: New Conditional Rendering
    end
    
    loop For each part in processedContent
        alt part.type === 'text'
            Template->>Children: Render MarkdownRenderer<br/>(with :loading prop)
        else part.type === 'thinking'
            Template->>Children: Render ArtifactThinking<br/>(when part.loading)
        else part.type === 'artifact'
            Template->>Children: Render ArtifactPreview<br/>(with block, messageId, threadId)
        else part.type === 'tool_call'
            Template->>Children: Render ToolCallPreview<br/>(with block, block-status)
        end
    end
    
    rect rgb(245, 245, 245)
    Note over Template,Store: Watch on processedContent<br/>maintains artifact interactions
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The changes span 7 files with mixed complexity: most are straightforward utility class and CSS rule updates (trivial), but MessageBlockContent.vue and MessageBlockToolCall.vue involve significant structural refactoring with new computed properties and conditional rendering logic that requires separate reasoning per component.

Possibly related PRs

Suggested reviewers

  • zerob13

Poem

🐰 A rabbit's musing on the UI refresh...

Margins aligned and paddings tight,
Prose containers gleaming bright,
Tool calls trimmed to sleek delight,
Conditional rendering paths take flight,
Content flows through day and night! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat(theme): fix message paragraph gap and toolcall block" is partially related to the changeset. It accurately references real components of the changes, specifically the toolcall block UI refactor in MessageBlockToolCall.vue and the paragraph margin adjustments in MarkdownRenderer.vue and ThinkContent.vue. However, the title frames these primarily as theme/styling changes when the PR also includes significant structural refactoring, most notably the major rework of MessageBlockContent.vue that introduces new conditional rendering logic for different content types. The title captures only a subset of the changes and doesn't fully represent the broader scope, though it does correctly identify genuine aspects of the PR.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/message-ui-refactor

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zerob13
Copy link
Collaborator

zerob13 commented Oct 19, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (1)
src/renderer/src/components/message/MessageItemAssistant.vue (1)

259-259: Use English for log messages and avoid hardcoded user-facing strings.

Line 259 contains a Chinese error message '创建对话分支失败'. Per coding guidelines, all logs and comments must use English. Additionally, if this is displayed to users, it should use i18n rather than a hardcoded string.

Apply this diff to fix the issue:

- console.error('创建对话分支失败:', error)
+ console.error('Failed to create conversation branch:', error)

If this error message is user-facing, consider adding an i18n key and notification instead of just logging.

🧹 Nitpick comments (7)
src/renderer/src/components/message/MessageBlockToolCall.vue (4)

11-12: Avoid trailing dot when function name is empty.

Render the dot only when functionLabel is present.

-        <span class="truncate text-xs">{{ primaryLabel }}.{{ functionLabel }}</span>
+        <span class="truncate text-xs">
+          {{ primaryLabel }}<template v-if="functionLabel">.{{ functionLabel }}</template>
+        </span>

65-85: i18n fallback should not hardcode user-visible strings; also use English comments.

Per guidelines, avoid hardcoded UI text and keep comments/logs in English. Return the key as fallback (or a minimal English map), and update comments.

-// 创建一个安全的翻译函数
+// Safe translation function with fallback (returns key when i18n is unavailable)
 const t = (() => {
   try {
     const { t } = useI18n()
     return t
   } catch (e) {
-    // 如果 i18n 未初始化,提供默认翻译
-    return (key: string) => {
-      if (key === 'toolCall.calling') return '工具调用中'
-      if (key === 'toolCall.response') return '工具响应'
-      if (key === 'toolCall.end') return '工具调用完成'
-      if (key === 'toolCall.error') return '工具调用错误'
-      if (key === 'toolCall.title') return '工具调用'
-      if (key === 'toolCall.clickToView') return '点击查看详情'
-      if (key === 'toolCall.functionName') return '函数名称'
-      if (key === 'toolCall.params') return '参数'
-      if (key === 'toolCall.responseData') return '响应数据'
-      return key
-    }
+    // If i18n is not initialized, return the key so UI strings are not hardcoded
+    return (key: string) => key
   }
 })()

[ suggest_recommended_refactor ]


4-13: Prefer button semantics for disclosure; add ARIA for accessibility.

Use a button (or add ARIA) for keyboard and screen reader support.

-    <div
-      class="w-fit min-h-7 py-1.5 flex bg-accent hover:bg-accent/40 border rounded-lg flex-wrap items-center gap-2 px-2 text-xs leading-4 transition-colors duration-150 select-none cursor-pointer"
-      @click="toggleExpanded"
-    >
+    <button
+      type="button"
+      class="w-fit min-h-7 py-1.5 flex bg-accent hover:bg-accent/40 border rounded-lg flex-wrap items-center gap-2 px-2 text-xs leading-4 transition-colors duration-150 select-none cursor-pointer"
+      @click="toggleExpanded"
+      :aria-expanded="isExpanded"
+      aria-controls="toolcall-details"
+    >
 ...
-    </div>
+    </button>

Also add id="toolcall-details" on the expandable container:

-      <div
-        v-if="isExpanded"
-        class="rounded-lg border bg-muted text-card-foreground px-2 py-3 mt-2 mb-4"
-      >
+      <div
+        v-if="isExpanded"
+        id="toolcall-details"
+        class="rounded-lg border bg-muted text-card-foreground px-2 py-3 mt-2 mb-4"
+      >

178-183: Dead CSS: .message-tool-call is unused.

Either add the class to the header, or remove this block. Given you already use min-h-7 py-1.5, removal is cleaner.

- .message-tool-call {
-   min-height: 28px;
-   padding-top: 6px;
-   padding-bottom: 6px;
- }
src/renderer/src/components/SearchStatusIndicator.vue (2)

56-59: Localize the default label via i18n.

To meet i18n guidelines, treat label as an i18n key and translate in-component, falling back to the key.

 <script setup lang="ts">
 import { Icon } from '@iconify/vue'
-import { computed } from 'vue'
+import { computed } from 'vue'
+import { useI18n } from 'vue-i18n'
 
+const { t } = useI18n()
 const props = withDefaults(
   defineProps<{
     status:
@@
     interactive?: boolean
   }>(),
   {
-    label: 'web_search',
+    // default i18n key
+    label: 'web_search',
     favicons: () => [],
     interactive: false
   }
 )
@@
+const translatedLabel = computed(() => t(props.label))

And in template:

-      <span class="font-mono font-medium tracking-tight text-foreground/80 truncate leading-none">
-        {{ label }}
+      <span class="font-mono font-medium tracking-tight text-foreground/80 truncate leading-none">
+        {{ translatedLabel }}
       </span>

94-104: Consider consistent “running” visuals across components.

Here, “running” uses emerald color; MessageBlockToolCall uses muted + animate-pulse. Unifying improves UX. Optional.

-    default:
-      return 'text-emerald-500'
+    default:
+      return 'text-muted-foreground animate-pulse'
src/renderer/src/components/message/MessageBlockContent.vue (1)

3-4: Use stable keys instead of array index.

Index keys can cause reuse bugs during dynamic updates.

-  <template v-for="(part, index) in processedContent" :key="index">
+  <template v-for="(part, index) in processedContent" :key="part.id ?? `${part.type}-${index}`">
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3e5e93 and d2f74ca.

📒 Files selected for processing (7)
  • src/renderer/src/components/SearchStatusIndicator.vue (1 hunks)
  • src/renderer/src/components/markdown/MarkdownRenderer.vue (1 hunks)
  • src/renderer/src/components/message/MessageBlockContent.vue (1 hunks)
  • src/renderer/src/components/message/MessageBlockToolCall.vue (4 hunks)
  • src/renderer/src/components/message/MessageItemAssistant.vue (1 hunks)
  • src/renderer/src/components/message/MessageMinimap.vue (1 hunks)
  • src/renderer/src/components/think-content/ThinkContent.vue (2 hunks)
🧰 Additional context used
📓 Path-based instructions (16)
src/renderer/src/**/*

📄 CodeRabbit inference engine (.cursor/rules/i18n.mdc)

src/renderer/src/**/*: All user-facing strings must use i18n keys (avoid hardcoded user-visible text in code)
Use the 'vue-i18n' framework for all internationalization in the renderer
Ensure all user-visible text in the renderer uses the translation system

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/**/*.{vue,ts,js,tsx,jsx}

📄 CodeRabbit inference engine (.cursor/rules/project-structure.mdc)

渲染进程代码放在 src/renderer

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/src/**/*.{vue,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

src/renderer/src/**/*.{vue,ts,tsx,js,jsx}: Use the Composition API for better code organization and reusability
Implement proper state management with Pinia
Utilize Vue Router for navigation and route management
Leverage Vue's built-in reactivity system for efficient data handling

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/src/**/*.vue

📄 CodeRabbit inference engine (.cursor/rules/vue-best-practices.mdc)

Use scoped styles to prevent CSS conflicts between components

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,tsx,vue}: Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
Use TypeScript for all code; prefer types over interfaces.
Avoid enums; use const objects instead.
Use arrow functions for methods and computed properties.
Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/**/*.{vue,ts}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

Implement lazy loading for routes and components.

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/**/*.{ts,vue}

📄 CodeRabbit inference engine (.cursor/rules/vue-shadcn.mdc)

src/renderer/**/*.{ts,vue}: Use useFetch and useAsyncData for data fetching.
Implement SEO best practices using Nuxt's useHead and useSeoMeta.

Use Pinia for frontend state management (do not introduce alternative state libraries)

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use English for all logs and comments

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Enable and adhere to strict TypeScript typing (avoid implicit any, prefer precise types)

Use PascalCase for TypeScript types and classes

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/{src,shell,floating}/**/*.vue

📄 CodeRabbit inference engine (CLAUDE.md)

src/renderer/{src,shell,floating}/**/*.vue: Use Vue 3 Composition API for all components
All user-facing strings must use i18n keys via vue-i18n (no hard-coded UI strings)
Use Tailwind CSS utilities and ensure styles are scoped in Vue components

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/src/components/**/*

📄 CodeRabbit inference engine (CLAUDE.md)

Organize UI components by feature within src/renderer/src/

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/src/**

📄 CodeRabbit inference engine (AGENTS.md)

Place Vue 3 app source under src/renderer/src (components, stores, views, i18n, lib)

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/src/**/*.{vue,ts}

📄 CodeRabbit inference engine (AGENTS.md)

All user-facing strings must use vue-i18n ($t/keys) rather than hardcoded literals

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
**/*.{ts,tsx,js,jsx,vue,css,scss,md,json,yml,yaml}

📄 CodeRabbit inference engine (AGENTS.md)

Prettier style: single quotes, no semicolons, print width 100; run pnpm run format

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx,vue}: Use OxLint for JS/TS code; keep lint clean
Use camelCase for variables and functions
Use SCREAMING_SNAKE_CASE for constants

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
src/renderer/**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

Name Vue component files in PascalCase (e.g., ChatInput.vue)

Files:

  • src/renderer/src/components/SearchStatusIndicator.vue
  • src/renderer/src/components/markdown/MarkdownRenderer.vue
  • src/renderer/src/components/message/MessageItemAssistant.vue
  • src/renderer/src/components/think-content/ThinkContent.vue
  • src/renderer/src/components/message/MessageBlockToolCall.vue
  • src/renderer/src/components/message/MessageBlockContent.vue
  • src/renderer/src/components/message/MessageMinimap.vue
🧠 Learnings (1)
📚 Learning: 2025-08-28T08:07:05.182Z
Learnt from: neoragex2002
PR: ThinkInAIXYZ/deepchat#807
File: src/renderer/src/components/markdown/MarkdownRenderer.vue:58-58
Timestamp: 2025-08-28T08:07:05.182Z
Learning: In src/renderer/src/components/markdown/MarkdownRenderer.vue, the unscoped <style> tag is intentionally used for global prose styles and the anchor .markdown-renderer fix, as confirmed by user neoragex2002.

Applied to files:

  • src/renderer/src/components/markdown/MarkdownRenderer.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build-check (x64)
🔇 Additional comments (7)
src/renderer/src/components/message/MessageItemAssistant.vue (1)

18-18: Spacing adjustment from margin-based to flexbox gap.

The change from space-y-2 to gap-1.5 appropriately uses the flexbox gap property for the flex column container, providing more consistent and predictable spacing control. This aligns with the PR's styling refinements for message layouts.

src/renderer/src/components/message/MessageMinimap.vue (2)

6-9: Pointer-events isolation pattern implemented correctly.

The inner wrapper correctly re-enables pointer events with pointer-events-auto, ensuring the minimap bars remain interactive while the outer padding area (line 3) is non-interactive. This isolates event handling to just the bar region.

The implementation is correct, but the overall behavior should be verified in conjunction with the outer container change at line 3.


3-3: The pointer-events pattern is correctly implemented and intentional.

After examining the file structure, the behavior change is well-designed and poses no issues:

  • Bars remain fully interactive: The button elements (lines 15-36) are nested inside the pointer-events-auto wrapper (line 7), preserving all click, hover, and focus handlers.
  • Usage label is display-only: The usage percentage (lines 40-44) has no event handlers—it's a text-only display element outside the interactive wrapper.
  • No breaking changes: The outer container's pointer-events-none prevents interaction with padding areas while the inner wrapper precisely re-enables interaction where needed.

This is a sound CSS isolation pattern that properly boundaries interaction zones.

src/renderer/src/components/markdown/MarkdownRenderer.vue (1)

101-103: Paragraph margin reset looks good.

Aligns vertical rhythm with the rest of the prose rules; list paragraph spacing is already handled below. No issues.

Based on learnings

src/renderer/src/components/SearchStatusIndicator.vue (1)

4-4: Sizing tweak LGTM.

Utility-based min-h-7 py-1.5 is consistent with the rest of the PR. No functional concerns.

src/renderer/src/components/think-content/ThinkContent.vue (1)

33-36: Scoped prose spacing LGTM.

Class + scoped rules keep spacing tight without leaking globally. No issues.

Also applies to: 89-98

src/renderer/src/components/message/MessageBlockContent.vue (1)

19-21: Props binding is correct. The ToolCallPreview component defines block and blockStatus (camelCase), and the template binding using :block-status correctly maps to blockStatus per Vue 3 conventions. No changes needed.

Comment on lines +5 to +6
<MarkdownRenderer v-if="part.type === 'text'" :content="part.content" :loading="part.loading" />

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Prop mismatch: MarkdownRenderer has no loading prop.

Strict template typing will flag this; at runtime it becomes an HTML attribute. Either stop passing it or add the prop to MarkdownRenderer.

Two options:

  • Remove the prop here:
-    <MarkdownRenderer v-if="part.type === 'text'" :content="part.content" :loading="part.loading" />
+    <MarkdownRenderer v-if="part.type === 'text'" :content="part.content" />
  • Or, add the prop to MarkdownRenderer.vue:
-defineProps<{
-  content: string
-  debug?: boolean
-}>()
+defineProps<{
+  content: string
+  debug?: boolean
+  loading?: boolean
+}>()
📝 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.

Suggested change
<MarkdownRenderer v-if="part.type === 'text'" :content="part.content" :loading="part.loading" />
<MarkdownRenderer v-if="part.type === 'text'" :content="part.content" />
🤖 Prompt for AI Agents
In src/renderer/src/components/message/MessageBlockContent.vue around lines 5-6,
the template passes a loading prop to <MarkdownRenderer> which does not declare
that prop, causing strict template typing errors and the prop being rendered as
an HTML attribute; either remove :loading="part.loading" from this usage, or add
a loading prop to MarkdownRenderer.vue (declare it in the script block with the
correct type—e.g., Boolean or a more specific type matching part.loading—and a
sensible default) and update its TypeScript/props interface so the component
accepts and uses the prop (and forward it internally if necessary).

@zerob13 zerob13 merged commit 0606781 into dev Oct 20, 2025
2 checks passed
zerob13 added a commit that referenced this pull request Oct 22, 2025
* style(settings): format about page link handler (#1016)

* style(ollama): format model config handlers (#1018)

* fix: think content scroll issue (#1023)

* fix: remove shimmer for think content

* chore: update screen shot and fix scroll issue

* chore: update markdown renderer

* fix: import button bug and prevent backup overwriting during import (#1024)

* fix(sync): fix import button bug and prevent backup overwriting during import

* fix(sync): fix import button bug and prevent backup overwriting during import

* fix(sync): fix import button bug and prevent backup overwriting during import

* refactor(messageList): refactor message list ui components (#1026)

* feat: remove new thread button, add clean button.

* refactor(messageList): refactor message list ui components

* feat: add configurable fields for chat settings

- Introduced ConfigFieldHeader component for consistent field headers.
- Added ConfigInputField, ConfigSelectField, ConfigSliderField, and ConfigSwitchField components for various input types.
- Created types for field configurations in types.ts to standardize field definitions.
- Implemented useChatConfigFields composable to manage field configurations dynamically.
- Added useModelCapabilities and useModelTypeDetection composables for handling model-specific capabilities and requirements.
- Developed useSearchConfig and useThinkingBudget composables for managing search and budget configurations.

* feat: implement input history management in prompt input

- Added `useInputHistory` composable for managing input history and navigation.
- Implemented methods for setting, clearing, and confirming history placeholders.
- Integrated arrow key navigation for browsing through input history.

feat: enhance mention data handling in prompt input

- Created `useMentionData` composable to aggregate mention data from selected files and MCP resources.
- Implemented watchers to update mention data based on selected files, MCP resources, tools, and prompts.

feat: manage prompt input configuration with store synchronization

- Developed `usePromptInputConfig` composable for managing model configuration.
- Implemented bidirectional sync between local config and chat store.
- Added debounced watcher to reduce updates and improve performance.

feat: streamline TipTap editor operations in prompt input

- Introduced `usePromptInputEditor` composable for managing TipTap editor lifecycle and content transformation.
- Implemented methods for handling mentions, pasting content, and clearing editor content.

feat: handle file operations in prompt input

- Created `usePromptInputFiles` composable for managing file selection, paste, and drag-drop operations.
- Implemented methods for processing files, handling dropped files, and clearing selected files.

feat: manage rate limit status in prompt input

- Developed `useRateLimitStatus` composable for displaying and polling rate limit status.
- Implemented methods for handling rate limit events and computing status icons, classes, and tooltips.

* refactor(artifacts): migrate component logic to composables and update documentation

- Refactor ArtifactDialog.vue to use composables for view mode, viewport size, code editor, and export functionality
- Simplify HTMLArtifact.vue by removing drag-resize logic and using fixed viewport dimensions
- Clean up MermaidArtifact.vue styling and structure
- Update component refactoring guide to reflect new patterns and best practices
- Adjust prompt input composable to allow delayed editor initialization
- Update internationalization files for new responsive label

* fix(lint): unused variables

* fix(format): format code

* CodeRabbit Generated Unit Tests: Add renderer unit tests for components and composables

* feat: implement input history management in chat input component

- Added `useInputHistory` composable for managing input history and placeholder navigation.
- Implemented methods for setting, clearing, and confirming history placeholders.
- Integrated arrow key navigation for cycling through input history.

feat: enhance mention data handling in chat input

- Created `useMentionData` composable to manage mention data aggregation.
- Implemented watchers for selected files and MCP resources/tools/prompts to update mention data.

feat: manage prompt input configuration and synchronization

- Developed `usePromptInputConfig` composable for managing model configuration.
- Implemented bidirectional sync between local config refs and chat store.
- Added debounced watcher to reduce updates to the store.

feat: manage prompt input editor operations

- Introduced `usePromptInputEditor` composable for handling TipTap editor operations.
- Implemented content transformation, mention insertion, and paste handling.
- Added methods for handling editor updates and restoring focus.

feat: handle prompt input files management

- Created `usePromptInputFiles` composable for managing file operations in prompt input.
- Implemented file selection, paste, drag-drop, and prompt files integration.

feat: implement rate limit status management

- Developed `useRateLimitStatus` composable for managing rate limit status display and polling.
- Added methods for retrieving rate limit status icon, class, tooltip, and wait time formatting.

* feat: enhance chat input component with context length management and settings integration

* feat: update model configuration and enhance error handling in providers

* feat: add MCP tools list component and integrate with chat settings
feat: enhance artifact dialog with improved error handling and localization
fix: update Mermaid artifact rendering error handling and localization
fix: improve input settings error handling and state management
fix: update drag and drop composable to handle drag events correctly
fix: update Vitest configuration for better project structure and alias resolution

* fix(i18n): add unknownError translation

---------

Co-authored-by: deepinsect <deepinsect@github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: add Poe provider integration and icon support  (#1028)

* feat: add Poe provider integration and icon support

* chore: format and lint

---------

Co-authored-by: zerob13 <zerob13@gmail.com>

* fix: make auto scroll works (#1030)

* fix: allow settings window links to open externally (#1029)

* fix(settings): allow target blank links

* fix: harden settings window link handling

* feat: enhance GitHub Copilot Device Flow with OAuth token management and API token retrieval (#1021)

* feat: enhance GitHub Copilot Device Flow with OAuth token management and API token retrieval

- Fixed request header for managing OAuth tokens and retrieving API tokens.
- Enhanced model definitions and added new models for better compatibility.

* fix: remove privacy related log

* fix: OAuth 2.0 for slow_down response

* fix: handle lint errors

* fix: provider fetched from publicdb

* fix(githubCopilotProvider): update request body logging format for clarity

* fix(githubCopilotProvider): improve error handling and logging in device flow

* feat(theme): fix message paragraph gap and toolcall block (#1031)

Co-authored-by: deepinsect <deepinsect@github.com>

* fix: scroll to bottom (#1034)

* fix: add debounce for renderer

* feat: add max wait for renderer

* chore(deps): upgrade markdown renderer add worker support

* chore: bump markdown version

* fix(build): use es module worker format (#1037)

* feat: remove function deleteOllamaModel (#1036)

* feat: remove function deleteOllamaModel

* fix(build): use es module worker format (#1037)

---------

Co-authored-by: duskzhen <zerob13@gmail.com>

* perf: update dependencies to use stream-monaco and bump vue-renderer-markdown version (#1038)

* feat(theme): add markdown layout style and table style (#1039)

* feat(theme): add markdown layout style and table style

* fix(lint): remove props

---------

Co-authored-by: deepinsect <deepinsect@github.com>

* feat: support effort and verbosity (#1040)

* chore: bump up version

* feat: add jiekou.ai as LLM provider (#1041)

* feat: add jiekou.ai as LLM provider

* fix: change api type to jiekou

---------

Co-authored-by: zerob13 <zerob13@gmail.com>

* chore: update provider db

---------

Co-authored-by: 韦伟 <xweimvp@gmail.com>
Co-authored-by: Happer <ericted8810us@gmail.com>
Co-authored-by: deepinsect <deepinsect@github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: cp90 <153345481+cp90-pixel@users.noreply.github.com>
Co-authored-by: Cedric <14017092+douyixuan@users.noreply.github.com>
Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
Co-authored-by: yyhhyyyyyy <yyhhyyyyyy8@gmail.com>
Co-authored-by: cnJasonZ <gbdzxalbb@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants