Skip to content

feat: Add global chat for navigation #5820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e68961b
feat: ai flow chat
HugoCasa May 26, 2025
9661f13
Merge remote-tracking branch 'origin/main' into hc/ai-flow-chat
HugoCasa May 27, 2025
50b9dd0
youpi
HugoCasa May 29, 2025
700c484
feat: preprocessor and error handler support
HugoCasa May 30, 2025
13de5ec
Merge remote-tracking branch 'origin/main' into hc/ai-flow-chat
HugoCasa Jun 2, 2025
38aaa44
fix: reactivity
HugoCasa Jun 2, 2025
6240ab6
Add GlobalChat component with drawer functionality
claude[bot] May 27, 2025
c2f40cb
draft
centdix May 23, 2025
7cb8f0a
use triggerable by ai compoennt
centdix May 26, 2025
db99f55
make drawer triggerable
centdix May 27, 2025
4ac46ee
implement logic
centdix May 27, 2025
2496741
add inkeep tool
centdix May 27, 2025
4da5255
cleaner code
centdix May 27, 2025
f13b8f3
make more things available
centdix May 28, 2025
86e6023
more integrations + better system prompt
centdix May 28, 2025
d6340cc
fix docs fetching
centdix May 28, 2025
fb41953
small fix
centdix May 28, 2025
a2a1df1
cleaning
centdix May 28, 2025
ffc6cda
add ask in search bar + right top icon on homepage + suggestions
centdix May 29, 2025
624e379
fix button
centdix May 29, 2025
7a0b39f
disable chat if no ai providers
centdix May 29, 2025
9c31afe
add inkeep endpoint
centdix May 29, 2025
5d14c8a
draft working stuff
centdix May 29, 2025
0217a41
cleaner code
centdix May 29, 2025
1cb8e0d
better chat
centdix May 30, 2025
dd3ff96
fix
centdix May 30, 2025
b98b451
send license and uid
centdix May 30, 2025
2a41322
better anim
centdix May 30, 2025
31f1bed
move logic
centdix May 30, 2025
a6e9ef5
parse links in chat
centdix May 30, 2025
011f881
add missing integration
centdix May 30, 2025
3aaba09
add reset button
centdix May 30, 2025
2fc4d51
fix
centdix May 31, 2025
4238173
rm file
centdix Jun 2, 2025
6e4fdd6
integrate navigator mode
centdix Jun 2, 2025
af37a93
integrate all changes
centdix Jun 2, 2025
6f5806d
add hide button
centdix Jun 2, 2025
ff3b1d1
adjust drawer size
centdix Jun 2, 2025
e331c82
add script ai chat integration
centdix Jun 2, 2025
e7f7801
fix drawer
centdix Jun 2, 2025
89934ec
small fixes
centdix Jun 2, 2025
8185a08
small fixes
centdix Jun 2, 2025
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
Prev Previous commit
Next Next commit
cleaning
  • Loading branch information
centdix committed Jun 2, 2025
commit a2a1df16f07662e219eed3634899fe2568babe13
15 changes: 3 additions & 12 deletions frontend/src/lib/components/chat/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ GENERAL PRINCIPLES:
- Maintain a friendly, professional tone
- 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.
- 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.

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.
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.

Exemple of good behavior:
- User: "How can I set my AI providers?"
- You: <call get_documentation and fetch relevant documentation>
- You: <call get_triggerable_components to find relevant components>
- You: <trigger the components>
- 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?"
- You: "Here is where you can find what you were looking for. <precisions about the request based on the documentation>"
`

const GET_DOCUMENTATION_TOOL: ChatCompletionTool = {
Expand Down Expand Up @@ -315,15 +315,6 @@ export function prepareSystemMessage(): ChatCompletionMessageParam {
}
}

// Prepare user message with context
export function prepareUserMessage(message: string): string {
return `
MESSAGE: ${message}

Feel free to use the get_page_html tool first if you need to understand the current page structure.
`
}

// Interface for chat context
export interface AIChatContext {
loading: Writable<boolean>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/components/sidebar/SidebarContent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
href: `${base}/`,
icon: Home,
aiId: 'sidebar-menu-link-home',
aiDescription: 'Button to navigate to home'
aiDescription:
"Button to navigate to home which contains all the user's scripts, flows and apps"
},
{
label: 'Runs',
Expand Down