Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix spacing of API keys in settings
Tomas Valentaa0e0efc53174
diff --git a/pages/settings.tsx b/pages/settings.tsxindex 84f0c381d..60f1d1798 100644--- a/pages/settings.tsx+++ b/pages/settings.tsx@@ -4,13 +4,13 @@ import { GetServerSideProps } from 'next'import { createServerSupabaseClient } from '@supabase/auth-helpers-nextjs'import { useSupabaseClient, useUser } from '@supabase/auth-helpers-react'-import Button from 'components/Button'import Text from 'components/Text'+import Input from 'components/Input'+import Button from 'components/Button'import { Database } from 'db/supabase'import { serverCreds } from 'db/credentials'import useModelProviderArgs from 'hooks/useModelProviderArgs'import { providerTemplates, ModelProvider } from 'state/model'-import Input from 'components/Input'export const getServerSideProps: GetServerSideProps<Props> = async (ctx) => {const supabase = createServerSupabaseClient<Database>(ctx, serverCreds)@@ -53,30 +53,45 @@ function Settings({ }: Props) {flex-colspace-y-4space-x-0- overflow-hiddenp-8+ overflow-hiddenmd:flex-rowmd:space-y-0md:space-x-8md:p-12">- <div className="flex items-start justify-start">- <div className="items-center flex space-x-2">+ <div className="+ flex+ items-start+ justify-between+ flex-col+ ">+ <div className="+ items-center+ flex+ space-x-2+ "><SettingsIcon size="30px" /><Textsize={Text.size.S1}text="Settings"/></div>+ <div className="pt-2">+ <Button+ onClick={handleSignOut}+ text="Sign out"+ />+ </div></div>-<divclassName="flex+ overflow-auto+ scrollerflex-1flex-col- items-startspace-y-6">@@ -128,7 +143,7 @@ function Settings({ }: Props) {flexpt-1flex-col- space-y-3+ space-y-4flex-1w-[450px]"@@ -136,6 +151,15 @@ function Settings({ }: Props) {{Object.entries(providerTemplates).map(([provider, value]) =><divkey={provider}+ className="+ space-y-4+ flex+ flex-col+ p-2+ rounded+ bg-slate-100+ flex-1+ ">{Object.entries(value.creds || {}).map(([key, cred]) =><div key={key}>@@ -152,14 +176,8 @@ function Settings({ }: Props) {)}</div></div>- <div className="pt-2">- <Button- onClick={handleSignOut}- text="Sign out"- />- </div></div>- </div >+ </div>)}diff --git a/state/model.ts b/state/model.tsindex f72187d54..fb2402b69 100644--- a/state/model.ts+++ b/state/model.ts@@ -532,8 +532,7 @@ export const providerTemplates: {openai_api_base: {label: 'Azure OpenAI API base',type: 'string',- }-+ },},models: [{