add script ai chat integration
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
import ChatMode from './ChatMode.svelte'
|
||||
import { chatMode } from '$lib/stores'
|
||||
import Markdown from 'svelte-exmarkdown'
|
||||
import TriggerableByAi from '$lib/components/TriggerableByAI.svelte'
|
||||
|
||||
let {
|
||||
allowedModes,
|
||||
@@ -261,6 +262,14 @@
|
||||
{/if}
|
||||
|
||||
<div class:border-t={messages.length > 0}>
|
||||
<TriggerableByAi
|
||||
id={`ai-chat-for-${$chatMode}`}
|
||||
description={`AI Chat helper for ${$chatMode}`}
|
||||
onTrigger={(value) => {
|
||||
instructions = value ?? ''
|
||||
sendRequest()
|
||||
}}
|
||||
/>
|
||||
{#if $chatMode === 'script'}
|
||||
<div class="flex flex-row gap-1 mb-1 overflow-scroll pt-2 px-2 no-scrollbar">
|
||||
<Popover>
|
||||
|
||||
@@ -37,6 +37,13 @@ GENERAL PRINCIPLES:
|
||||
- When asked about a specific script, flow or app, first check components directly related to the mentioned entity, before checking the other components.
|
||||
- When you do not find what you are looking for on the current page, go to the home page by looking for the "Home" component, then scan the components again.
|
||||
|
||||
IMPORTANT CONSIDERATIONS:
|
||||
- If you navigate to a script creation page, consider this:
|
||||
- The user will need to select a language for the script. If provided, select the one he mentioned, else do not do anything.
|
||||
- If he provides any other information but its script settings, do the changes.
|
||||
- Close the settings once the changes are done.
|
||||
- Then if the user have described what he wanted the script to do, search for the script ai chat in the page and input it's request in it.
|
||||
|
||||
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 something like "Here is where you can find what you were looking for...". Complete your response with precisions about how it works based on the documentation. Also drop a link to the relevant documentation if possible.
|
||||
|
||||
Reference in New Issue
Block a user