mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 08:06:46 +00:00
* feat: guidance for building standalone ai agents in ai sessions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: agent guidance for resource-only sessions, no flow tools Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: tell the user to deploy a drafted tool script with its agent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: scope plain agent values, document tool_inputs, list agents in get_instructions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: test and run ai agents from ai sessions, open agents in their editor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: full-bleed agent editor tabs, back to the run form for agent tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: describe read-and-run as running agents too, pin agent run links Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: host the agent editor natively in session tabs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: switch the agent editor to tabs below 900px Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: name an agent's session tab after its summary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: show deployed agents in session tabs, open and run them from the chat Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: deploy agents from the chat, report agent tabs as the active editor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: pick agents from the tab picker, name their tabs, scope the agent page to its workspace Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: leave open editors alone on agent writes, read the agent page's workspace user Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: refresh an agent's deployed page when the chat deploys or deletes it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: name agent tabs before they load, mark agents in the changes drawer, stay on a deleted agent's tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep a cleared agent summary out of its tab name Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the resource drawer's json option that the resources list still passes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: open an agent in an AI session from its pages, fix review findings on agent tabs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: name the reserved agent tool names in the agent guidance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: reload an agent's editor on a discard, open a new agent in a session Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: show agents as agents on compare and deploy, name a never-deployed one by its path Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep a deployed agent's type in its draft diff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: link a fork row to the agent editor only on the side that holds the agent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: guard agent page paths, mark drafted agents in the picker, side-aware agent rows on fork compare Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
141 lines
4.0 KiB
TypeScript
141 lines
4.0 KiB
TypeScript
// Auto-generated by generate.py - DO NOT EDIT
|
|
// Re-export all prompts
|
|
export * from './prompts';
|
|
|
|
import * as prompts from './prompts';
|
|
|
|
// Languages that use the TypeScript SDK
|
|
const TS_SDK_LANGUAGES = ['bun', 'deno', 'nativets', 'bunnative'];
|
|
|
|
// Languages that use the Python SDK
|
|
const PY_SDK_LANGUAGES = ['python3'];
|
|
|
|
// Languages that use the TypeScript Workflow-as-Code SDK
|
|
const WAC_TS_SDK_LANGUAGES = ['bun'];
|
|
|
|
// Languages that use the Python Workflow-as-Code SDK
|
|
const WAC_PY_SDK_LANGUAGES = PY_SDK_LANGUAGES;
|
|
|
|
// Helper to combine prompts for scripts
|
|
export function getScriptPrompt(language: string): string {
|
|
const langKey = `LANG_${language.toUpperCase()}` as keyof typeof prompts;
|
|
const langPrompt = (prompts as Record<string, string>)[langKey] || '';
|
|
|
|
// Determine which SDK to include based on language
|
|
let sdkPrompt = '';
|
|
if (TS_SDK_LANGUAGES.includes(language)) {
|
|
sdkPrompt = prompts.SDK_TYPESCRIPT;
|
|
} else if (PY_SDK_LANGUAGES.includes(language)) {
|
|
sdkPrompt = prompts.SDK_PYTHON;
|
|
}
|
|
|
|
return [
|
|
prompts.SCRIPT_BASE,
|
|
langPrompt,
|
|
sdkPrompt
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper to combine prompts for flows
|
|
export function getFlowPrompt(): string {
|
|
return [
|
|
prompts.FLOW_BASE,
|
|
prompts.OPENFLOW_SCHEMA
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for resource & variable authoring
|
|
export function getResourcePrompt(): string {
|
|
return [
|
|
prompts.RESOURCES_BASE
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for AI agent authoring
|
|
export function getAgentPrompt(): string {
|
|
return [
|
|
prompts.AGENT_BASE
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for raw app authoring (chat consumers). Inline backend runnables are
|
|
// ordinary Windmill jobs, so the reference has to carry the SDK the runnable
|
|
// calls — without it an agent invents client functions and hand-rolls HTTP.
|
|
// Only one SDK is returned: both would double an already large tool result.
|
|
export function getRawAppPrompt(language?: string): string {
|
|
const sdkPrompt = PY_SDK_LANGUAGES.includes(language ?? '')
|
|
? prompts.SDK_PYTHON
|
|
: prompts.SDK_TYPESCRIPT;
|
|
|
|
return [
|
|
prompts.RAW_APP_BASE,
|
|
sdkPrompt
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for data pipeline authoring (chat consumers)
|
|
export function getPipelinePrompt(): string {
|
|
return [
|
|
prompts.PIPELINE_BASE
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for data table schema changes, migrations and permissions (chat consumers)
|
|
export function getDatatablePrompt(): string {
|
|
return [
|
|
prompts.DATATABLE_BASE
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper for the workspace settings document (chat consumers)
|
|
export function getWorkspaceSettingsPrompt(): string {
|
|
return [
|
|
prompts.WORKSPACE_SETTINGS_BASE
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper to get the datatable SQL SDK reference (wmill.datatable()).
|
|
// Pass a language to get only that SDK; omit it to get both.
|
|
export function getDatatableSdkReference(language?: string): string {
|
|
if (language == null) {
|
|
return [
|
|
prompts.DATATABLE_SDK_TYPESCRIPT,
|
|
prompts.DATATABLE_SDK_PYTHON
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
if (TS_SDK_LANGUAGES.includes(language)) {
|
|
return prompts.DATATABLE_SDK_TYPESCRIPT;
|
|
}
|
|
if (PY_SDK_LANGUAGES.includes(language)) {
|
|
return prompts.DATATABLE_SDK_PYTHON;
|
|
}
|
|
// Unknown language: return both rather than nothing.
|
|
return [
|
|
prompts.DATATABLE_SDK_TYPESCRIPT,
|
|
prompts.DATATABLE_SDK_PYTHON
|
|
].filter(Boolean).join('\n\n');
|
|
}
|
|
|
|
// Helper to combine prompts for Workflow-as-Code scripts
|
|
export function getWorkflowAsCodePrompt(language?: string): string {
|
|
let sdkPrompt = '';
|
|
|
|
if (language == null) {
|
|
sdkPrompt = [
|
|
prompts.WAC_SDK_TYPESCRIPT,
|
|
prompts.WAC_SDK_PYTHON
|
|
].filter(Boolean).join('\n\n');
|
|
} else if (WAC_TS_SDK_LANGUAGES.includes(language)) {
|
|
sdkPrompt = prompts.WAC_SDK_TYPESCRIPT;
|
|
} else if (WAC_PY_SDK_LANGUAGES.includes(language)) {
|
|
sdkPrompt = prompts.WAC_SDK_PYTHON;
|
|
} else {
|
|
return '';
|
|
}
|
|
|
|
return [
|
|
prompts.WORKFLOW_AS_CODE_BASE,
|
|
sdkPrompt
|
|
].filter(Boolean).join('\n\n');
|
|
}
|