Skip to content

Feat/vault assistant improvements#282

Draft
munimunigamer wants to merge 6 commits intomasterfrom
feat/vault-assistant-improvements
Draft

Feat/vault assistant improvements#282
munimunigamer wants to merge 6 commits intomasterfrom
feat/vault-assistant-improvements

Conversation

@munimunigamer
Copy link
Copy Markdown
Member

Just general improvements to the vault assistant from bugs/stuff I noticed using it

munimunigamer and others added 5 commits March 22, 2026 01:40
…utton

- Add inline rename UI with pencil icon on conversation list items
- Fix auto-title: generateTitle now reads from chatMessages instead of
  conversationHistory (which isn't populated during eager save)
- Stop button uses same accent style as send, just swaps icon

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the Vault Assistant's interactivity and usability. It introduces real-time streaming of AI responses, making interactions feel more fluid and immediate. The underlying AI service now supports dynamic tool loading, allowing the assistant to adapt its capabilities based on the conversation's needs. Additionally, several quality-of-life improvements have been made, including conversation renaming, more robust conversation saving, and better control over AI generation, all contributing to a more polished and efficient user experience.

Highlights

  • Real-time Streaming Responses: Implemented real-time streaming for assistant text and reasoning, providing a more interactive and responsive user experience. This includes a streaming cursor and dynamic updates to the message content as it's generated.
  • Dynamic Tool Loading for AI Assistant: Introduced a dynamic tool loading mechanism, allowing the AI assistant to activate specific tool categories (e.g., characters, lorebooks, images) on demand. This optimizes tool usage and provides more focused capabilities based on the conversation context.
  • Conversation Management Enhancements: Added the ability to rename conversations directly within the UI, implemented eager saving of conversations to immediately reflect new chats in history, and improved error handling and state resetting during conversation changes or generation aborts.
  • Improved User Experience and Controls: Refined the UI for assistant messages, separating reasoning and content for clarity. The send button now transforms into a 'stop generation' button when the AI is active, giving users more control over ongoing processes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces substantial improvements to the Vault Assistant, enhancing both user experience and architectural robustness. Key features include real-time streaming of assistant responses, a 'stop generation' button, and inline conversation renaming. The introduction of dynamic tool loading is a significant architectural upgrade that should improve efficiency and scalability. The error handling and state management have also been made more robust. I've identified a few areas for minor refactoring to improve code clarity and maintainability, detailed in the comments.

Comment on lines +238 to +247
// Abort any ongoing generation first
if (abortController) {
abortController.abort()
abortController = null
}
isGenerating = false
isThinking = false
activeToolCalls = []
streamingChanges = []
streamingMessageId = null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This block of code for resetting the generation state is duplicated in handleSwitchConversation (lines 262-271). To improve maintainability and reduce redundancy, consider extracting this logic into a dedicated helper function.

For example:

function resetGenerationState() {
  if (abortController) {
    abortController.abort();
    abortController = null;
  }
  isGenerating = false;
  isThinking = false;
  activeToolCalls = [];
  streamingChanges = [];
  streamingMessageId = null;
}

This new function could then be called from both handleNewConversation and handleSwitchConversation.

Comment on lines +340 to +342
} catch {
// Ignore
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The error in this catch block is silently ignored. Other recent changes in this file have improved error handling by logging errors to the console (e.g., lines 252, 276). For consistency and to aid in debugging, it would be beneficial to log the error here as well.

      } catch (e) {
        console.error('[VaultAssistant] Rename failed:', e)
      }

Comment on lines +1256 to +1257
abortController.abort()
abortController = null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Setting abortController = null here is redundant. The finally block in the handleSend function (line 605) is already responsible for cleaning up the abortController. Centralizing state cleanup in one place makes the code easier to maintain and reason about. The onclick handler should only be responsible for triggering the abort action.

                      abortController.abort()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants