Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
instructions editor
Vasek Mlejnskyd97d1b6fd15b
diff --git a/components/AgentInstructions.tsx b/components/AgentInstructions.tsxnew file mode 100644index 000000000..6595c7a88--- /dev/null+++ b/components/AgentInstructions.tsx@@ -0,0 +1,22 @@+import { useState } from 'react'++import InstructionsEditor from 'components/Editor/Template/NodeJSExpressTemplate/InstructionsEditor'++function AgentInstructions() {+ const [content, setContent] = useState('')+ return (+ <div className="flex-1 flex flex-col items-start justify-start space-y-2">+ <h3 className="text-white font-bold">What do you want the AI developer to build?</h3>+ <div className="relative flex flex-col p-2 cursor-text w-full flex-1 overflow-auto bg-gray-900 border border-gray-700 rounded-md">+ <InstructionsEditor+ className='absolute inset-0 bg-gray-900 p-2 text-gray-100'+ placeholder="Create a website using Nextjs"+ content={content}+ onChange={setContent}+ />+ </div>+ </div>+ )+}++export default AgentInstructionsdiff --git a/components/Editor/Template/NodeJSExpressTemplate/InstructionsEditor/index.tsx b/components/Editor/Template/NodeJSExpressTemplate/InstructionsEditor/index.tsxindex 24a20c84f..7bf5705e5 100644--- a/components/Editor/Template/NodeJSExpressTemplate/InstructionsEditor/index.tsx+++ b/components/Editor/Template/NodeJSExpressTemplate/InstructionsEditor/index.tsx@@ -1,11 +1,13 @@import { EditorContent } from '@tiptap/react'import Fuse from 'fuse.js'+import clsx from 'clsx'import Text from 'components/Text'import useDocEditor from 'hooks/useDocEditor'import { Reference } from 'editor/referenceType'export interface Props {+ className?: string,title?: stringplaceholder?: stringonChange: (value: string) => void@@ -14,6 +16,7 @@ export interface Props {}function InstructionsEditor({+ className,title,onChange,content,@@ -28,15 +31,7 @@ function InstructionsEditor({})return (- <div className="- flex- flex-col- space-y-2- self-stretch- pb-6- border-b- border-slate-200- ">+ <div className={clsx('flex flex-col space-y-2 self-stretch pb-6', className)}>{title &&<TextclassName="font-bold text-slate-400"diff --git a/pages/agent/smol-developer/setup.tsx b/pages/agent/smol-developer/setup.tsxindex 550ebaa80..273fb9b2f 100644--- a/pages/agent/smol-developer/setup.tsx+++ b/pages/agent/smol-developer/setup.tsx@@ -13,6 +13,7 @@ import {import Steps from 'components/Steps'import SelectRepository from 'components/SelectRepository'+import AgentInstructions from 'components/AgentInstructions'import { serverCreds } from 'db/credentials'import { useGitHubClient } from 'hooks/useGitHubClient'import { useRepositories } from 'hooks/useRepositories'@@ -54,8 +55,8 @@ export interface PostAgentBody {const steps = [{ name: 'Select Repository', status: 'current' },- { name: 'Write Instructions', status: 'upcoming' },- { name: 'Step 3', status: 'upcoming' },+ { name: 'Your Instructions', status: 'upcoming' },+ { name: 'Deploy AI Developer', status: 'upcoming' },]export const getServerSideProps: GetServerSideProps = async (ctx) => {@@ -188,7 +189,7 @@ function Setup() {githubAccounts={githubAccounts}/>) : currentStep === 1 ? (- <div>prompt</div>+ <AgentInstructions />) : currentStep === 2 ? (<div>keys + deploy</div>) : null}