cherry-studio/docs/technical
one d05d1309ca
refactor(Preview,CodeBlock): preview components and tools (#8565)
* refactor(CodeBlockView): generalize tool and preview

Generalize code tool to action tool
- CodeTool -> ActionTool
- usePreviewTools -> useImagePreview
- rename code tool classname from icon to tool-icon

Generalize preview
- move image preview components to Preview dir
- simplify file names

* refactor(useImageTools): simplify implementation, add pan

* refactor(Preview): move image tools to floating toolbar

* refactor: add enableDrag, enable zooming for SvgPreview

* test: add tests for preview components

* feat(Preview): add download buttons to dropdown

* refactor(Preview): remove setTools from preview, improve SvgPreview

* refactor: add useTemporaryValue

* test: add tests for hooks

* test: add tests for CodeToolButton and CodeToolbar

* refactor(PreviewTool): add a setting item to enable preview tools

* test: update snapshot

* refactor: extract more code tools to hooks, add tests

* refactor: extract tools from CodeEditor and CodeViewer

* test: add tests for new tool hooks

* refactor(CodeEditor): change collapsible to expanded, change wrappable to unwrapped

* refactor: migrate codePreview to codeViewer

* docs: CodeBlockView

* refactor: add custom file icons, center the reset button

* refactor: improve code quality

* refactor: improve migration by deprecating codePreview

* refactor: improve PlantUml and svgToCanvas

* fix: plantuml style

* test: fix tests

* fix: button icon

* refactor(SvgPreview): debounce rendering

* feat(PreviewTool): add a dialog tool

* fix: remove isValidPlantUML, improve plantuml rendering

* refactor: extract shadow dom renderer

* refactor: improve plantuml error messages

* test: add tests for ImageToolbar and ImageToolButton

* refactor: add ImagePreviewLayout to simplify layout and tests

* refactor: add useDebouncedRender, update docs

* chore: clean up unused props

* refactor: clean transformation before copy/download/preview

* refactor: update migrate version

* refactor: style refactoring and fixes

- show header background in split view
- fix status bar radius
- reset special view transformation on theme change
- fix wrap tool icon
- add a divider to split view
- improve split view toggling (switch back to previous view)
- revert copy tool to separate tools
- fix top border radius for special views

* refactor: move GraphvizPreview to shadow DOM

- use renderString
- keep renderSvgInShadowHost api consistent with others

* fix: tests, icons, deleted files

* refactor: use ResetIcon in ImageToolbar

* test: remove unnecessary tests

* fix: min height for special preview

* fix: update migrate
2025-08-06 20:09:49 +08:00
..
.assets.how-to-i18n docs: update how to i18n demo pic 2025-07-31 17:39:58 +08:00
code-execution.md feat(CodeBlock): support matplotlib in code execution (#8069) 2025-07-21 21:19:06 +08:00
CodeBlockView-en.md refactor(Preview,CodeBlock): preview components and tools (#8565) 2025-08-06 20:09:49 +08:00
CodeBlockView-zh.md refactor(Preview,CodeBlock): preview components and tools (#8565) 2025-08-06 20:09:49 +08:00
db.settings.md refactor(translate): Language Type (#7727) 2025-07-07 22:08:56 +08:00
how-to-i18n-en.md perf(i18n): improve performance when getting i18n text (#8548) 2025-07-27 17:30:52 +08:00
how-to-i18n-zh.md perf(i18n): improve performance when getting i18n text (#8548) 2025-07-27 17:30:52 +08:00
how-to-use-logger-en.md docs(logger): update logger docs (#8436) 2025-07-24 08:16:47 +08:00
how-to-use-logger-zh.md docs(logger): update logger docs (#8436) 2025-07-24 08:16:47 +08:00
how-to-use-messageBlock.md feat: 添加 messageBlock、messageThunk 和 useMessageOperations 使用指南文档 2025-04-29 15:14:55 +08:00
how-to-use-messageThunk.md feat: 添加 messageBlock、messageThunk 和 useMessageOperations 使用指南文档 2025-04-29 15:14:55 +08:00
how-to-use-useMessageOperations.md feat: 添加 messageBlock、messageThunk 和 useMessageOperations 使用指南文档 2025-04-29 15:14:55 +08:00
how-to-write-middlewares.md refactor: model list and health check (#7997) 2025-07-21 15:57:08 +08:00
ImagePreview-en.md refactor(Preview,CodeBlock): preview components and tools (#8565) 2025-08-06 20:09:49 +08:00
ImagePreview-zh.md refactor(Preview,CodeBlock): preview components and tools (#8565) 2025-08-06 20:09:49 +08:00
KnowledgeService.md docs: Add comprehensive documentation for KnowledgeService concurrent processing mechanism 2025-03-02 20:36:13 +08:00
message-lifecycle.png refactor: message block structure (#4660) 2025-04-29 14:12:07 +08:00
Message.md refactor: message block structure (#4660) 2025-04-29 14:12:07 +08:00