Skip to content

Conversation

iceljc
Copy link
Collaborator

@iceljc iceljc commented Oct 13, 2025

PR Type

Enhancement


Description

  • Unified handling of program code rendering across chat and conversation views

  • Removed Python-specific condition, now all non-JavaScript code uses Markdown rendering

  • Added consistent code block display for conversation dialog elements


Diagram Walkthrough

flowchart LR
  A["Rich Content Message"] --> B{"JavaScript Code?"}
  B -- "Yes" --> C["RcJsInterpreter"]
  B -- "No" --> D{"Program Code?"}
  D -- "Yes" --> E["Markdown Renderer"]
  D -- "No" --> E
Loading

File Walkthrough

Relevant files
Enhancement
rc-message.svelte
Simplify program code rendering conditions                             

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte

  • Removed Python-specific language check condition
  • Simplified conditional logic to handle all non-JavaScript program code
    uniformly
  • All program code except JavaScript now renders through Markdown
    component
+1/-2     
conv-dialog-element.svelte
Add program code rendering support to dialog                         

src/routes/page/conversation/[conversationId]/conv-dialog-element.svelte

  • Added new condition for non-JavaScript program code rendering
  • Program code now displays using Markdown component with rawText flag
  • Maintains JavaScript interpreter for JavaScript code blocks
+6/-0     

@qodo-merge-pro
Copy link

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
No custom compliance provided

Follow the guide to enable custom compliance check.

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@iceljc iceljc merged commit 530cd5b into SciSharp:main Oct 13, 2025
1 of 2 checks passed
@qodo-merge-pro
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use correct field for code

To display program code correctly, pass message?.rich_content?.message?.code to
the Markdown component instead of message?.text.

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte [30-31]

 {:else if message?.rich_content?.message?.rich_type === RichType.ProgramCode}
-    <Markdown containerClasses={markdownClasses} text={message?.text} rawText />
+    <Markdown containerClasses={markdownClasses} text={message?.rich_content?.message?.code} rawText />
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a significant bug where message.text, likely a summary, is used instead of the actual code from message.rich_content.message.code, which would result in incorrect content being displayed.

High
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant