Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix markdown newline bug

Tomas Valenta63103e613e26
diff --git a/hooks/useDocEditor.ts b/hooks/useDocEditor.ts
index 6166a05f8..b5583960a 100644
--- a/hooks/useDocEditor.ts
+++ b/hooks/useDocEditor.ts
@@ -18,7 +18,6 @@ function useDocEditor({
placeholder?: string
}) {
const editor = useEditor({
- content: initialContent,
parseOptions: {
preserveWhitespace: 'full',
},
@@ -40,7 +39,9 @@ function useDocEditor({
}
}),
],
-
+ onCreate({ editor }) {
+ editor?.commands.setContent(initialContent)
+ },
onUpdate({ transaction, editor }) {
if (transaction.docChanged) {
onContentChange(editor.storage.markdown.getMarkdown())
diff --git a/pages/agent/smol-developer/setup.tsx b/pages/agent/smol-developer/setup.tsx
index 95c50d683..ea65005a9 100644
--- a/pages/agent/smol-developer/setup.tsx
+++ b/pages/agent/smol-developer/setup.tsx
@@ -117,7 +117,6 @@ function Setup() {
const [instructions, setInstructions] = useState('')
const posthog = usePostHog()
const router = useRouter()
- const [openAIAPIKey, setOpenAIAPIKey] = useState('')
const [isDeploying, setIsDeploying] = useState(false)
const handleMessageEvent = useCallback((event: MessageEvent) => {
@@ -158,7 +157,7 @@ function Setup() {
title: 'Smol PR',
branch: `pr/smol-dev/${nanoid(6).toLowerCase()}`,
body: instructions,
- commitMessage: 'Smol dev initial commit',
+ commitMessage: 'Initial commit',
modelConfig,
})
// Redirect to the dashboard.