mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
28ec5793a8
* feat(web): add line numbers and wrap toggle for code blocks * fix(web): preserve markdown code block copy semantics
12 lines
318 B
TypeScript
12 lines
318 B
TypeScript
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 },
|
|
)
|