style: improved layout and functionality for the prompt editing field.
This commit is contained in:
parent
d98020e12c
commit
2c28e3bb76
@ -109,21 +109,25 @@ const AgentEditPage: FC = () => {
|
||||
<Form.Item name="name" label={t('agents.add.name')} rules={[{ required: true }]}>
|
||||
<Input placeholder={t('agents.add.name.placeholder')} spellCheck={false} allowClear />
|
||||
</Form.Item>
|
||||
<div style={{ position: 'relative' }}>
|
||||
<Form.Item
|
||||
name="prompt"
|
||||
label={t('agents.add.prompt')}
|
||||
rules={[{ required: true }]}
|
||||
style={{ position: 'relative' }}>
|
||||
<TextArea placeholder={t('agents.add.prompt.placeholder')} spellCheck={false} rows={10} />
|
||||
</Form.Item>
|
||||
<Button
|
||||
icon={loading ? <LoadingOutlined /> : <ThunderboltOutlined />}
|
||||
onClick={handleButtonClick}
|
||||
style={{ position: 'absolute', top: 8, right: 8 }}
|
||||
disabled={loading}
|
||||
/>
|
||||
</div>
|
||||
<Form.Item
|
||||
name="prompt"
|
||||
label={
|
||||
<>
|
||||
{t('agents.add.prompt')}{' '}
|
||||
<Button
|
||||
size="small"
|
||||
style={{ marginLeft: 5 }}
|
||||
type="text"
|
||||
icon={loading ? <LoadingOutlined /> : <ThunderboltOutlined />}
|
||||
onClick={handleButtonClick}
|
||||
disabled={loading}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
rules={[{ required: true }]}
|
||||
style={{ position: 'relative' }}>
|
||||
<TextArea placeholder={t('agents.add.prompt.placeholder')} spellCheck={false} rows={10} />
|
||||
</Form.Item>
|
||||
<Form.Item wrapperCol={{ span: 16 }}>
|
||||
<Button type="primary" htmlType="submit">
|
||||
{t('common.save')}
|
||||
|
||||
@ -161,7 +161,7 @@ const Assistants: FC<Props> = ({
|
||||
suffix={<CommandKey>⌘+K</CommandKey>}
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
style={{ borderRadius: 4, borderWidth: 0.5 }}
|
||||
style={{ borderRadius: 16, borderWidth: 0.5 }}
|
||||
onKeyDown={onSearch}
|
||||
ref={searchRef}
|
||||
onFocus={() => dispatch(setSearching(true))}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user