Skip to content

feat: add navigator mode to AIChat and unify UI #5859

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

Merged
merged 102 commits into from
Jun 4, 2025
Merged

Conversation

centdix
Copy link
Collaborator

@centdix centdix commented Jun 3, 2025

Important

This pull request adds a navigator mode to AIChat, unifies the UI with AI-triggerable components, and enhances AI-driven navigation and interaction capabilities.

  • AIChat Enhancements:
    • Introduces navigator mode in AIChat for AI-driven navigation.
    • Updates AIChatManager to handle new mode and manage AI interactions.
    • Adds GlobalChat component for global AI chat functionality.
  • UI Integration:
    • Adds TriggerableByAI component to make UI elements AI-discoverable and triggerable.
    • Updates MenuButton, MenuLink, MeltButton, and MenuItem to support AI-triggerable actions.
    • Modifies ItemsList, CreateActionsApp, CreateActionsFlow, and CreateActionsScript to include AI descriptions and IDs.
  • Backend and API:
    • Adds /inkeep route in lib.rs for AI documentation retrieval.
  • Miscellaneous:
    • Removes chatMode store and replaces it with aiChatManager state management.
    • Refactors shared.ts to remove chatRequest and integrate it into AIChatManager.

This description was created by Ellipsis for 680612c. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 634080a in 1 minute and 34 seconds. Click for details.
  • Reviewed 38 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/common/confirmationModal/UnsavedConfirmationModal.svelte:67
  • Draft comment:
    Ensure TriggerableByAI has proper accessibility (aria/focus) and unique ID when modal is open.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. frontend/src/lib/components/copilot/chat/navigator/core.ts:22
  • Draft comment:
    Confirm that the new prompt instruction for handling confirmation modals aligns with UI behavior.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_NaE8NVKTW1AAqNwc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed e41c6f7 in 1 minute and 36 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/navigator/core.ts:265
  • Draft comment:
    Good addition: the onFinishToolCall with 'Retrieved documentation' reinforces success feedback. Ensure consistency with error handling and consider using a finally block if future modifications require guaranteed cleanup.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_jP1SF6jgfgOGDmRV

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed ff4e11d in 3 minutes and 9 seconds. Click for details.
  • Reviewed 52 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:32
  • Draft comment:
    Changed the onTrigger function signature to accept an optional parameter (value?: string) instead of a required id. Ensure all trigger usages are updated accordingly.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:88
  • Draft comment:
    Added an optional 'options' parameter to changeMode (with closeScriptSettings) to control UI behavior. Consider adding a comment/doc to clarify its purpose.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While documentation can be helpful, in this case the parameter name closeScriptSettings is quite self-explanatory. The code that uses it is also straightforward - it simply finds and triggers a close handler if one exists. The comment is suggesting something that would be nice-to-have but isn't strictly necessary for code understanding. The parameter could have subtle implications or edge cases that aren't immediately obvious from the name alone. Future maintainers might wonder when and why they should use this option. The parameter usage is very simple and contained - it just closes a UI component. There's no complex logic or edge cases. The name clearly describes what it does. While documentation is generally good, in this case the parameter name is clear enough and the implementation is simple enough that additional documentation would not provide significant value.
3. frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:106
  • Draft comment:
    In the 'script' branch, if options.closeScriptSettings is true, the code triggers the close-script-builder-settings component. Verify that invoking onTrigger without an argument is safe and intentional.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify if invoking onTrigger without an argument is safe and intentional. This falls under asking the author to confirm their intention, which is against the rules. The comment does not provide a specific suggestion or point out a clear issue, but rather asks for confirmation.
4. frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:150
  • Draft comment:
    The changeModeTool now passes { closeScriptSettings: true } when switching modes. Confirm that this behavior matches the intended UI flow for closing script settings.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_D2frDrCkPFMG6noc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 0b576a3 in 1 minute and 47 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/routes/(root)/(logged)/+layout.svelte:461
  • Draft comment:
    Review: Changed iconClasses from violet-800 to violet-400. Ensure that using the same color in both light and dark modes provides sufficient contrast and aligns with design guidelines.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_Yx3kRmLPM30unFkZ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 8b16c37 in 1 minute and 44 seconds. Click for details.
  • Reviewed 22 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/routes/(root)/(logged)/+layout.svelte:458
  • Draft comment:
    Updated the 'Ask AI' icon's classes to use violet-400 for both themes. Confirm this consistent color choice matches design guidelines.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. frontend/src/routes/(root)/(logged)/+layout.svelte:634
  • Draft comment:
    Consistently applying violet-400 for the 'Ask AI' icon. Please verify this change aligns with the overall UI styling.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_MVUheZY6shdZcLkK

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 2a394bf in 2 minutes and 29 seconds. Click for details.
  • Reviewed 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/AIChat.svelte:4
  • Draft comment:
    Removed the direct HistoryManager import since it's now obtained from aiChatManager.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining a change that was made. It doesn't provide a suggestion, ask for confirmation, or highlight a potential issue.
2. frontend/src/lib/components/copilot/chat/AIChat.svelte:68
  • Draft comment:
    Accessing historyManager via aiChatManager is cleaner; ensure it's always defined before use to prevent runtime errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The comment is speculative - it suggests there might be a runtime error if historyManager is undefined. However, there's no clear evidence that this is actually a problem. The code looks like a standard property access and aiChatManager appears to be a core part of the component that's imported and used throughout. The comment also starts with "ensure that..." which is a red flag. Maybe aiChatManager.historyManager could actually be undefined and this is a real concern? The import and usage of aiChatManager could be worth investigating further. While it's theoretically possible, there's no strong evidence that this is actually a problem. The code shows aiChatManager being used confidently throughout the component, and this appears to be a core part of the application's architecture. Delete this comment as it's speculative, starts with "ensure that", and lacks strong evidence of an actual issue.

Workflow ID: wflow_v9iFDFybbJZ2UriL

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed aa0a0c2 in 1 minute and 34 seconds. Click for details.
  • Reviewed 25 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/routes/(root)/(logged)/+page.svelte:23
  • Draft comment:
    Removed AskAiButton and aiChatManager imports; ensure their functionality is now handled by the navigator mode.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. frontend/src/routes/(root)/(logged)/+page.svelte:214
  • Draft comment:
    Removed the conditional block for rendering AskAiButton; confirm that the navigator mode now offers the intended UI access.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_xC1hDxZwihgsBFjk

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed ae92b65 in 2 minutes and 20 seconds. Click for details.
  • Reviewed 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/lib/components/copilot/chat/AIChat.svelte:128
  • Draft comment:
    Using an inline arrow function for deletePastChat creates a new function on each render, which could impact re-rendering performance if the child component does shallow prop checks. Consider binding once (e.g., historyManager.deletePastChat.bind(historyManager)) or defining the callback outside the render.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% While technically correct that inline functions create new function instances on each render, this is a micro-optimization that likely has negligible impact. The component is a chat interface where re-renders are infrequent and performance is not critical. The code is also more readable in its current form. The suggested bind approach could actually make the code less maintainable. The comment is technically accurate about function recreation. Maybe in a high-performance component this could matter? This is a chat interface where render performance is not critical. The current code is clear and maintainable, and the suggested change would complicate it for negligible benefit. Delete this comment as it suggests a micro-optimization that would make the code less readable for negligible performance benefit in this context.

Workflow ID: wflow_yFkR6v9GNTO6wx2V

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 5bf9abc in 2 minutes and 16 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/routes/(root)/(logged)/+layout.svelte:660
  • Draft comment:
    The class changed from 'min-h-screen' (100vh) to 'min-h-[97vh]'. This appears to be a magic value. Please add a comment explaining why 97vh was chosen and ensure it works consistently across devices.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% This appears to be a UI layout change. The 97vh value is likely chosen to accommodate other UI elements like headers/footers while preventing unwanted scrollbars. Since this is a pure UI styling change and we're told to assume UI changes are intentional, we should trust that the developer tested this value works well across devices. The comment is essentially questioning a UI styling decision. The comment raises a valid point about documenting magic numbers. In some cases, having unexplained constants can make code harder to maintain. However, in this case it's a UI styling value that was likely determined through testing. We're explicitly told to trust UI changes and not comment on them. The exact height value is not a critical implementation detail that needs documentation. Delete this comment as it questions a UI styling decision, which we're told to assume was made correctly. The exact vh value is not a critical implementation detail requiring documentation.

Workflow ID: wflow_ZXD2u99G2uqE7e78

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed 680612c in 2 minutes and 12 seconds. Click for details.
  • Reviewed 63 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/src/routes/(root)/(logged)/+layout.svelte:369
  • Draft comment:
    Add flex container classes (h-screen flex flex-col) to ensure full-height layout.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, suggesting a style change without questioning or suggesting improvements. It doesn't ask for confirmation or suggest a specific code change.
2. frontend/src/routes/(root)/(logged)/+layout.svelte:565
  • Draft comment:
    Add 'pointer-events-none' to the overlay div to disable interactions when hidden.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. frontend/src/routes/(root)/(logged)/+layout.svelte:649
  • Draft comment:
    Replace fixed height styling on Splitpanes with flex utilities for improved responsiveness.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
4. frontend/src/routes/(root)/(logged)/+layout.svelte:656
  • Draft comment:
    Refactor the content container and using flex and overflow-y-auto for proper space utilization and scrolling.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. frontend/src/routes/(root)/(logged)/+layout.svelte:702
  • Draft comment:
    Apply flex layout classes (flex flex-col min-h-0) to the GlobalChat Pane for consistent sizing.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, suggesting a style change without indicating any issue or asking for confirmation. It doesn't align with the rules for useful comments.

Workflow ID: wflow_PagbWPBPOYRsBqY1

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@HugoCasa HugoCasa changed the title feat: Add navigator mode to AIChat and unify UI feat: add navigator mode to AIChat and unify UI Jun 4, 2025
@rubenfiszel rubenfiszel added this pull request to the merge queue Jun 4, 2025
@rubenfiszel rubenfiszel removed this pull request from the merge queue due to a manual request Jun 4, 2025
@rubenfiszel rubenfiszel merged commit cbba829 into main Jun 4, 2025
15 checks passed
@rubenfiszel rubenfiszel deleted the refactorchat branch June 4, 2025 17:17
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants