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