- Users
+ Users
{#each settingsKeys as category}
- {category}
+
+ {category}
+
{/each}
diff --git a/frontend/src/lib/components/TriggerableByAI.svelte b/frontend/src/lib/components/TriggerableByAI.svelte
index 6fdb1c6cfa..f8aa6dbbcb 100644
--- a/frontend/src/lib/components/TriggerableByAI.svelte
+++ b/frontend/src/lib/components/TriggerableByAI.svelte
@@ -4,13 +4,14 @@
let { id, description, onTrigger, children } = $props<{
id: string | undefined
description: string | undefined
- onTrigger: (value?: string) => void
+ onTrigger?: (value?: string) => void // Function to call when the trigger is activated, if not provided, the component is discoverable for information purposes only
children?: () => any
}>()
// Track animation state
let isAnimating = $state(false)
+ // Component is not discoverable if id or description is not provided
const disabled = !id || !description
// Wrapper for onTrigger that adds animation
diff --git a/frontend/src/lib/components/chat/GlobalChat.svelte b/frontend/src/lib/components/chat/GlobalChat.svelte
index 18c680565f..b0d1a31b31 100644
--- a/frontend/src/lib/components/chat/GlobalChat.svelte
+++ b/frontend/src/lib/components/chat/GlobalChat.svelte
@@ -48,9 +48,9 @@
}
-
+
-
+
{#each messages as msg}
diff --git a/frontend/src/lib/components/chat/GlobalChatDrawer.svelte b/frontend/src/lib/components/chat/GlobalChatDrawer.svelte
deleted file mode 100644
index 694086d3f9..0000000000
--- a/frontend/src/lib/components/chat/GlobalChatDrawer.svelte
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
diff --git a/frontend/src/lib/components/chat/core.ts b/frontend/src/lib/components/chat/core.ts
index 9f34ead6d9..720267c70b 100644
--- a/frontend/src/lib/components/chat/core.ts
+++ b/frontend/src/lib/components/chat/core.ts
@@ -11,41 +11,38 @@ import OpenAI from 'openai'
// System prompt for the LLM
export const CHAT_SYSTEM_PROMPT = `
-You are Windmill's intelligent assistant, designed to help users navigate the application and answer questions about its functionality.
+You are Windmill's intelligent assistant, designed to help users navigate the application and answer questions about its functionality. It is your only purpose to help the user in the context of the windmill application.
+Windmill is an open-source developer platform for building internal tools, API integrations, background jobs, workflows, and user interfaces. It offers a unified system where scripts are automatically turned into sharable UIs and can be composed into flows or embedded in custom applications.
You have access to these tools:
-1. View current triggerable components on the page (get_triggerable_components)
-2. Execute component trigger functions (trigger_component)
+1. View current buttons and inputs on the page (get_triggerable_components)
+2. Execute buttons and inputs (trigger_component)
3. Get documentation for user requests (get_documentation)
-RESPONDING TO QUESTIONS:
-- When users ask about application features or concepts, use get_documentation to retrieve accurate information
-- Present information concisely and clearly, highlighting key points
-- For complex topics, offer to guide users through relevant sections of the application
-
-NAVIGATION ASSISTANCE:
-- When users want to perform an action, first use get_triggerable_components to understand available options
-- Always explain what you'll do before taking any action
-- Take action only when you're confident it matches the user's intent
-- For multi-step processes:
- * Guide users step-by-step, explaining each action
- * After each action, wait briefly then recheck available components before continuing
- * Maintain context throughout the interaction
-
-USER EXPERIENCE GUIDELINES:
-- Be proactive in suggesting helpful next steps
-- If a request is ambiguous, ask clarifying questions before taking action
-- After completing a task involving panels or drawers, look for and use close/dismiss buttons
-- If you encounter an error or can't complete a request, explain why and suggest alternatives
-- Adapt your level of guidance based on user expertise (more detailed for beginners)
+INSTRUCTIONS:
+- When users ask about application features or concepts, first use get_documentation internally to retrieve accurate information about how to fulfill the user's request.
+- Then immediately use the available tools to guide the user through the application. Do not wait for the user's confirmation before taking action.
+- Use get_triggerable_components to understand available options, and then trigger the components using trigger_component. Then wait a moment before rescanning the current page, and then continue with the next step. Do this 5 times max.
+- If you are not able to fulfill the user's request after 5 attempts, redirect the user to the documentation.
GENERAL PRINCIPLES:
- Be concise but thorough
-- Focus on being helpful rather than just informative
+- Focus on taking action and completing the user's goals
- Maintain a friendly, professional tone
-- Remember user preferences between interactions when possible
+- If you encounter an error or can't complete a request, explain why and suggest alternatives
+- When asked about a specific script, flow or app, first check components directly related to the mentioned entity, before checking the other components.
Always use the provided tools purposefully and appropriately to achieve the user's goals.
+Your actions only allow you to navigate the application through the provided tools.
+When you complete the user's request, do not say "I created..." or "I updated..." or "I deleted...", but rather say "Here is where you can find the action you wanted to perform, or the data you were looking for".
+Also ask him if he wants more informations from the documentation about its request.
+
+Exemple of good behavior:
+- User: "How can I set my AI providers?"
+- You:
+- You:
+- You:
+- You: "Here is where you can find the action you wanted to perform, or the data you were looking for. Do you need more informations?"
`
const GET_DOCUMENTATION_TOOL: ChatCompletionTool = {
@@ -115,7 +112,7 @@ function getTriggerableComponents(): string {
// List each registered component with its ID and description
Object.entries(registeredComponents).forEach(([id, component], index) => {
- result += `[${index}] ID: "${id}" - ${component.description}\n`
+ result += `[${index}] ID: "${id}" - ${component.description} - Triggerable: ${component.onTrigger ? 'Yes' : 'No'}\n`
})
return result
@@ -156,7 +153,7 @@ function triggerComponent(args: { id: string; value: string }): string {
async function getDocumentation(args: { request: string }): Promise {
const client = new OpenAI({
- apiKey: '',
+ apiKey: import.meta.env.VITE_INKEEP_API_KEY,
baseURL: 'https://api.inkeep.com/v1',
dangerouslyAllowBrowser: true
})
diff --git a/frontend/src/lib/components/common/button/Button.svelte b/frontend/src/lib/components/common/button/Button.svelte
index 25f032cdf4..26ea3ef567 100644
--- a/frontend/src/lib/components/common/button/Button.svelte
+++ b/frontend/src/lib/components/common/button/Button.svelte
@@ -293,6 +293,8 @@
{#if dropdownItems && dropdownItems.length > 0}