feat(web): add line numbers and wrap toggle for code blocks (#2933)

* feat(web): add line numbers and wrap toggle for code blocks

* fix(web): preserve markdown code block copy semantics
This commit is contained in:
LC authored and GitHub committed 2026-05-26 14:57:52 +08:00
1 parent c5a016ccc6
commit 28ec5793a8
10 files changed
+402 -33

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
import { atomWithStorage } from "jotai/utils"
export const CODE_BLOCK_WRAP_STORAGE_KEY = "picoclaw:code-block-wrap"
export const DEFAULT_CODE_BLOCK_WRAP = false
export const codeBlockWrapAtom = atomWithStorage<boolean>(
CODE_BLOCK_WRAP_STORAGE_KEY,
DEFAULT_CODE_BLOCK_WRAP,
undefined,
{ getOnInit: true },
)