You've already forked agentic-coding-workflow
主流程
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
placeholder="system prompt(已自动注入需求上下文,可修改)"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
/>
|
||||
<NInput
|
||||
v-model:value="newFirstMessage"
|
||||
type="textarea"
|
||||
placeholder="首条消息(创建后自动发送;留空则只建会话不发送)"
|
||||
:autosize="{ minRows: 1, maxRows: 4 }"
|
||||
/>
|
||||
<div class="flex justify-end gap-2">
|
||||
<NButton
|
||||
size="small"
|
||||
@@ -137,6 +143,10 @@ const PHASE_TITLE: Record<ArtifactPhase, string> = {
|
||||
auditing: '评审',
|
||||
}
|
||||
|
||||
// 新建会话默认首条消息:system prompt 仅随请求下发不产生消息,必须有一条
|
||||
// 用户消息才能触发 AI 开始输出,"创建并开始"靠它兑现。
|
||||
const DEFAULT_FIRST_MESSAGE = '请开始本阶段工作。'
|
||||
|
||||
const props = defineProps<{
|
||||
slug: string
|
||||
requirement: Requirement
|
||||
@@ -155,6 +165,7 @@ const conversations = ref<Conversation[]>([])
|
||||
const showCreateForm = ref(false)
|
||||
const newModelId = ref<string | undefined>(undefined)
|
||||
const newSystemPrompt = ref('')
|
||||
const newFirstMessage = ref(DEFAULT_FIRST_MESSAGE)
|
||||
const creating = ref(false)
|
||||
const draft = ref('')
|
||||
const scrollEl = ref<HTMLElement | null>(null)
|
||||
@@ -180,6 +191,7 @@ function openCreateForm() {
|
||||
props.requirement,
|
||||
props.prevArtifact,
|
||||
)
|
||||
newFirstMessage.value = DEFAULT_FIRST_MESSAGE
|
||||
showCreateForm.value = true
|
||||
}
|
||||
|
||||
@@ -196,6 +208,8 @@ async function onCreateConversation() {
|
||||
showCreateForm.value = false
|
||||
await loadConversations()
|
||||
await session.openConversation(conv.id)
|
||||
const first = newFirstMessage.value.trim()
|
||||
if (first) await session.sendMessage(first)
|
||||
} finally {
|
||||
creating.value = false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user