Conversation
Implement a custom hook to track pending states with cache persistence. The hook provides methods to set and check pending status for given IDs, with automatic cleanup of undefined values.
- Add new general-purpose spinner component with multiple variants - Rename old Spinner component to SearchSpinner to clarify its purpose - Update lucide-react dependency to v0.546.0
Introduce a new BlockingOverlay component to handle modal overlays with click handling and visibility control. The component includes click event propagation prevention and supports custom styling through className.
- Add mermaid_fix tool to handle and fix mermaid diagram errors - Implement pending state tracking for async operations - Add error callback to MermaidPreview component - Update i18n strings for mermaid error handling - Extend cache schema with pending_map for task tracking
- Add mermaid_fix translations for all supported languages - Complete missing translations marked with "[to be translated]" - Convert array to object for accessibility description in zh-cn
Add setError to the dependency array to prevent stale closure issues
Ensure the correct tool ID is used for cleanup and wrap fixCode in arrow function to maintain context
Move event processing function to a reusable hook to improve code reuse and enable promise-based completion tracking
Move code block editing functionality from Messages component to useEditCodeBlock hook for better reusability and maintainability
The event form cannot obtain handler completion status via promise. Plan to use useContext for topicId and useEditCodeBlock for editing.
Update test snapshots to reflect changes in component styling and structure Add mock for @cherrystudio/ui components in CodeBlock tests
Update JSDoc comments to be more descriptive and follow standard conventions
|
Note This issue/comment/review was translated by Claude. I have a few questions:
We could create more practical test cases to try, referring to:
Original Content有几个疑问:
可以多构造几个实际的测试用例试试,参考: |
Clean up code by removing unnecessary setError parameter that was not being used effectively. This simplifies the component interfaces and reduces potential error handling confusion.
|
Note This issue/comment/review was translated by Claude.
This situation is like when writing code has logical errors - the compiler won't report errors for you. This doesn't fall within the scope of this feature's fixes.
Original Content
这种情况就像是,写程序有逻辑错误时,编译器不会为你报错一样。这个不属于该功能的修复范围。
|
Clarify output format requirements and add detailed steps for error analysis Provide concrete examples for both fixable and unfixable cases
|
Note This issue/comment/review was translated by Claude. Is the quick model more of a smaller, faster model? Is it reliable to have it fix errors made by conversation models? Original Contentquick model 可能更多是个较小较快的模型?让它修复对话模型制造的错误靠谱吗? |
Note This issue/comment/review was translated by Claude. Providing error information and code as context is actually not a very difficult task. I can complete it using smaller models like qwen-flash. However, if the error information itself is not clear, using better models won't improve the results much. Inserting additional rules in the prompt might yield better results. Original Content提供错误信息和代码作为上下文的话其实并不是很困难的任务,我用qwen-flash这样的小模型也能完成。但如果错误信息本身不清晰的话,换更好的模型效果也不佳。在prompt额外插入一些规则或许效果会更好。 |
|
Note This issue/comment/review was translated by Claude. The best approach is to introduce artifacts. Whenever users request to generate mermaid-compliant diagrams, call the built-in mermaid prompt to generate them. The results might be better than fixing errors afterward. Original Content最佳的方式是引入制品,只要用户要求生成符合mermaid的图,就调用内置的mermaid提示词去生成。效果可能比反过来修复错误好点 |
As an extra page? |
Not needed; simply split a area in the chat interface for this purpose. This area can also be used to render html/pdf, etc. |
That sounds like a independent module. What's the design? |
|
we can reuse a component introduced in this PR #5193 when it is merged |
|
Note This issue/comment/review was translated by Claude. It's great to create and show mermaid diagrams with pre-defined prompt in the panel. But the quick fix tool in code blocks is still fine, right? Or should we move all the interactions to the canvas? Original ContentIt's great to create and show mermaid diagrams with pre-defined prompt in the panel. But the quick fix tool in code blocks is still fine, right? Or should we move all the interactions to the canvas? |
What this PR does
2025-10-22.07-27-13.mov
Fixes #10834
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Breaking changes
If this PR introduces breaking changes, please describe the changes and the impact on users.
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note