mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 09:59:45 +00:00
feat(workflow): integrate temporal workflow bundles and support dev/prod mode
This commit is contained in:
@@ -3,7 +3,11 @@ import { DatabaseSessionStorage } from '../database-session-storage'
|
||||
import { prisma, AssetType, Prisma, type Skill } from '@shumai/db'
|
||||
import { logger } from '@shumai/core/src/logger'
|
||||
import { s3Service } from '@shumai/core/src/s3/s3'
|
||||
import { type AgentTool, type AgentMessage, type SessionTreeEntry } from '@earendil-works/pi-agent-core'
|
||||
import {
|
||||
type AgentTool,
|
||||
type AgentMessage,
|
||||
type SessionTreeEntry,
|
||||
} from '@earendil-works/pi-agent-core'
|
||||
import { type ImageContent } from '@earendil-works/pi-ai'
|
||||
import { ApplicationFailure } from '@temporalio/activity'
|
||||
import { assetService } from '@shumai/core/src/asset/asset'
|
||||
|
||||
@@ -261,10 +261,7 @@ export async function extractAiMetadataActivity(
|
||||
return generatedFiles
|
||||
}
|
||||
|
||||
export async function getEmbeddingContextActivity(params: {
|
||||
teamId: string
|
||||
assetId: string
|
||||
}) {
|
||||
export async function getEmbeddingContextActivity(params: { teamId: string; assetId: string }) {
|
||||
const team = await prisma.team.findUnique({
|
||||
where: { id: params.teamId },
|
||||
})
|
||||
|
||||
@@ -93,7 +93,11 @@ export async function agentAutofillMedia(task: WorkflowTask): Promise<void> {
|
||||
}
|
||||
|
||||
// 3. Get Project Autofill Fields
|
||||
const fields = await executeActivity(TaskQueueAgent, getProjectAutofillFieldsActivity, projectId)
|
||||
const fields = await executeActivity(
|
||||
TaskQueueAgent,
|
||||
getProjectAutofillFieldsActivity,
|
||||
projectId,
|
||||
)
|
||||
if (fields.length === 0) {
|
||||
if (placeholderCommentId) {
|
||||
await executeActivity(TaskQueueAgent, updateCommentActivity, {
|
||||
|
||||
Reference in New Issue
Block a user