aura-web/src/pages/AgentEditor/components/PromptEditor.tsx

61 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import { Form, Input } from 'antd';
import { FileTextOutlined } from '@ant-design/icons';
interface PromptEditorProps {
form: any;
markDirty: () => void;
}
export default function PromptEditor({ form, markDirty }: PromptEditorProps) {
return (
<div className="flex-1 agent-editor-pane">
<div className="agent-editor-pane-body">
<div className="agent-editor-pane-header">
<div>
<h3 className="agent-editor-pane-title"></h3>
<p className="agent-editor-pane-subtitle">
</p>
</div>
<span className="agent-editor-badge">
<FileTextOutlined />
System Prompt
</span>
</div>
<div className="agent-editor-intro">
<div className="agent-editor-intro-title"></div>
<div className="agent-editor-intro-text">
</div>
</div>
<Form
form={form}
layout="vertical"
onValuesChange={markDirty}
>
<div className="agent-editor-surface agent-editor-prompt-wrap">
<div style={{ fontSize: 12.5, color: 'var(--color-text-secondary)', marginBottom: 10, paddingInline: 4 }}>
</div>
<div className="agent-editor-prompt">
<Form.Item name="prompt" noStyle>
<Input.TextArea
rows={30}
placeholder="在这里输入智能体的人设、技能、风格和输出规范..."
className="border-none focus:ring-0 bg-transparent p-4 font-mono text-sm leading-relaxed"
style={{ height: 'calc(100vh - 290px)', resize: 'none', borderRadius: 16 }}
/>
</Form.Item>
</div>
</div>
<div className="text-[11px] text-gray-400 mt-2 px-2" style={{ color: 'var(--color-text-tertiary)' }}>
</div>
</Form>
</div>
</div>
);
}