Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-push:
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-cores
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/app/api/tools/edit-workflow/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { copilotCheckpoints, workflow as workflowTable } from '@/db/schema'
import { generateLoopBlocks, generateParallelBlocks } from '@/stores/workflows/workflow/utils'
import { convertYamlToWorkflow, parseWorkflowYaml } from '@/stores/workflows/yaml/importer'

export const dynamic = 'force-dynamic'

const logger = createLogger('EditWorkflowAPI')

export async function POST(request: NextRequest) {
Expand Down
8 changes: 5 additions & 3 deletions apps/sim/app/api/tools/get-yaml-structure/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { type NextRequest, NextResponse } from 'next/server'
import { YAML_WORKFLOW_PROMPT } from '../../../../lib/copilot/prompts'
import { getYamlWorkflowPrompt } from '@/lib/copilot/prompts'

export const dynamic = 'force-dynamic'

export async function POST(request: NextRequest) {
try {
Expand All @@ -8,7 +10,7 @@ export async function POST(request: NextRequest) {
return NextResponse.json({
success: true,
data: {
guide: YAML_WORKFLOW_PROMPT,
guide: getYamlWorkflowPrompt(),
message: 'Complete YAML workflow syntax guide with examples and best practices',
},
})
Expand All @@ -17,7 +19,7 @@ export async function POST(request: NextRequest) {
return NextResponse.json(
{
success: false,
error: 'Failed to get YAML structure guide',
error: 'Failed to get YAML structure',
},
{ status: 500 }
)
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/app/api/workflows/[id]/autolayout/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
import { db } from '@/db'
import { workflow as workflowTable } from '@/db/schema'

export const dynamic = 'force-dynamic'

const logger = createLogger('AutoLayoutAPI')

const AutoLayoutRequestSchema = z.object({
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/app/api/workflows/[id]/yaml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { copilotCheckpoints, workflow as workflowTable } from '@/db/schema'
import { generateLoopBlocks, generateParallelBlocks } from '@/stores/workflows/workflow/utils'
import { convertYamlToWorkflow, parseWorkflowYaml } from '@/stores/workflows/yaml/importer'

export const dynamic = 'force-dynamic'

const logger = createLogger('WorkflowYamlAPI')

// Request schema for YAML workflow operations
Expand Down
5 changes: 3 additions & 2 deletions apps/sim/lib/copilot/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,11 @@ export const TITLE_GENERATION_USER_PROMPT = (userMessage: string) =>
`Generate a concise title for a conversation that starts with this user message: "${userMessage}"\n\nReturn only the title text, nothing else.`

/**
* YAML Workflow Reference Guide
* Comprehensive guide for LLMs on how to write end-to-end YAML workflows correctly
* Lazy loaded to prevent memory issues during static generation
*/
export const YAML_WORKFLOW_PROMPT = `# Comprehensive Guide to Writing End-to-End YAML Workflows in Sim Studio
export const getYamlWorkflowPrompt =
() => `# Comprehensive Guide to Writing End-to-End YAML Workflows in Sim Studio

## Fundamental Structure

Expand Down