From d2c1bd79ac2860e4ca8d7335003b57ee3bba81d0 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Thu, 26 Feb 2026 08:12:54 -0800 Subject: [PATCH] Fix chaining multiple requests together. Fixes https://yaak.app/feedback/posts/request-chaining-issue-on-cold-start --- plugins/template-function-response/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/template-function-response/src/index.ts b/plugins/template-function-response/src/index.ts index 884c4c7d..dcf85295 100644 --- a/plugins/template-function-response/src/index.ts +++ b/plugins/template-function-response/src/index.ts @@ -72,6 +72,10 @@ export const plugin: PluginDefinition = { name: 'header', label: 'Header Name', async dynamic(ctx, args) { + // Dynamic form config also runs during send-time rendering. + // Keep this preview-only to avoid side-effect request sends. + if (args.purpose !== 'preview') return null; + const response = await getResponse(ctx, { requestId: String(args.values.request || ''), purpose: args.purpose, @@ -146,6 +150,10 @@ export const plugin: PluginDefinition = { label: 'JSONPath or XPath', placeholder: '$.books[0].id or /books[0]/id', dynamic: async (ctx, args) => { + // Dynamic form config also runs during send-time rendering. + // Keep this preview-only to avoid side-effect request sends. + if (args.purpose !== 'preview') return null; + const resp = await getResponse(ctx, { requestId: String(args.values.request || ''), purpose: 'preview',