You've already forked agentic-coding-workflow
主流程
This commit is contained in:
@@ -2,8 +2,9 @@ import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import {
|
||||
projectsApi,
|
||||
type Artifact,
|
||||
type ArtifactPhase,
|
||||
type Phase,
|
||||
type Prototype,
|
||||
type Requirement,
|
||||
type Status,
|
||||
} from '@/api/projects'
|
||||
@@ -51,26 +52,29 @@ export const useRequirementsStore = defineStore('requirements', () => {
|
||||
await refresh(forSlug)
|
||||
}
|
||||
|
||||
async function listPrototypes(forSlug: string, number: number): Promise<Prototype[]> {
|
||||
const out = await projectsApi.listPrototypes(forSlug, number)
|
||||
return out.prototypes
|
||||
}
|
||||
|
||||
async function createPrototype(
|
||||
async function listArtifacts(
|
||||
forSlug: string,
|
||||
number: number,
|
||||
body: { content: string; note?: string },
|
||||
): Promise<Prototype> {
|
||||
return await projectsApi.createPrototype(forSlug, number, body)
|
||||
phase?: ArtifactPhase,
|
||||
): Promise<Artifact[]> {
|
||||
return await projectsApi.listArtifacts(forSlug, number, phase)
|
||||
}
|
||||
|
||||
async function getPrototype(
|
||||
async function createArtifact(
|
||||
forSlug: string,
|
||||
number: number,
|
||||
body: { phase: ArtifactPhase; content: string; note?: string; source_message_id?: number },
|
||||
): Promise<Artifact> {
|
||||
return await projectsApi.createArtifact(forSlug, number, body)
|
||||
}
|
||||
|
||||
async function getArtifact(
|
||||
forSlug: string,
|
||||
number: number,
|
||||
phase: ArtifactPhase,
|
||||
version: number,
|
||||
): Promise<Prototype> {
|
||||
const out = await projectsApi.getPrototype(forSlug, number, version)
|
||||
return out.prototype
|
||||
): Promise<Artifact> {
|
||||
return await projectsApi.getArtifact(forSlug, number, phase, version)
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -84,8 +88,8 @@ export const useRequirementsStore = defineStore('requirements', () => {
|
||||
changePhase,
|
||||
close,
|
||||
reopen,
|
||||
listPrototypes,
|
||||
createPrototype,
|
||||
getPrototype,
|
||||
listArtifacts,
|
||||
createArtifact,
|
||||
getArtifact,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user