|
@@ -1225,9 +1225,7 @@ ToolRegistry.register<typeof WriteTool>({
|
|
|
container: "block",
|
|
container: "block",
|
|
|
render(props) {
|
|
render(props) {
|
|
|
const { theme, syntax } = useTheme()
|
|
const { theme, syntax } = useTheme()
|
|
|
- const lines = createMemo(() => {
|
|
|
|
|
- return props.input.content?.split("\n") ?? []
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const lines = createMemo(() => props.input.content?.split("\n") ?? [], [] as string[])
|
|
|
const code = createMemo(() => {
|
|
const code = createMemo(() => {
|
|
|
if (!props.input.content) return ""
|
|
if (!props.input.content) return ""
|
|
|
const text = props.input.content
|
|
const text = props.input.content
|