Skip to content

ui: turn on extensions at startup#1861

Merged
lilydelalande merged 7 commits into
mainfrom
ldelalande/turn-on-extensions-at-startup
Mar 26, 2025
Merged

ui: turn on extensions at startup#1861
lilydelalande merged 7 commits into
mainfrom
ldelalande/turn-on-extensions-at-startup

Conversation

@lilydelalande

Copy link
Copy Markdown
Contributor

Turns on extensions at start up -- should toggle extensions that fail to start up to off but we get too many toasts so should fix that in follow-up:

  • Receiving multiple notifications for a single extension add/remove operation.
  • Being flooded with successive toasts detailing the attempt to add an extension, its loading status, failure, and eventual removal.

@lilydelalande
lilydelalande force-pushed the ldelalande/turn-on-extensions-at-startup branch from 1c34e8e to 7d5990e Compare March 26, 2025 01:16
Comment thread ui/desktop/src/App.tsx

const setupExtensions = async () => {
// First quickly check if we have model and provider to set chat view
const checkRequiredConfig = async () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

rearranged code into this otherwise we were stuck on onboarding page until extensions finished loading

@@ -78,21 +78,51 @@ export async function activateExtension({
// AddToAgent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

had to explicitly throw all errors to get the intended behavior..

Comment thread ui/desktop/src/App.tsx
// Setup extensions in parallel
const setupExtensions = async () => {
// Set the ref immediately to prevent duplicate runs
initAttemptedRef.current = true;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does anything read from this? It doesn't appear so. We can probably remove it.

Comment thread ui/desktop/src/App.tsx
if (refreshedExtensions.length === 0) {
// If we still have no extensions, this is truly a first-time setup
console.log('First-time setup: Adding all built-in extensions...');
await initializeBuiltInExtensions(addExtension);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Conceptual question.

If refreshedExtensions comes back the first time you ever boot the app as empty, is it any different/required to have a separate initializeBuiltInExtensions function? Could we just use a single syncBuiltInExtensions that behaves the same was as initialize if there were no extensions to begin with?

(No need to address this in this PR if it distracts - just trying to find opportunities to reduce complexity)

@lilydelalande
lilydelalande merged commit a8dd39a into main Mar 26, 2025
@lilydelalande
lilydelalande deleted the ldelalande/turn-on-extensions-at-startup branch March 26, 2025 02:21
michaelneale added a commit that referenced this pull request Mar 26, 2025
* main:
  ui: turn on extensions at startup (#1861)
  ui: models dropdown (#1860)
  fix: cli empty line (#1856)
  feat: Allow setting OpenAI timeout from config (#1819)
  feat: add retry for google (#1854)
  feat(extensions): add Java/JDK support for MCP servers (#1816)
  feat: extract `StdioProcessError(msg)` to try to display (#1855)
  fix: show window bugfix (#1840)
  fix: append the attachment path to the existing text in the input prompt (#1842)
  docs: updated docs for smart approval mode (#1853)
  styles: chat scroll interaction (#1837)
  ui: add description field  to modal (#1846)
  feat: use temp dir for extracting goose binary (#1838)
  ui: remove and update extensions (#1847)
  fix: disappearing user text when stopped (#1839)
ahau-square pushed a commit that referenced this pull request May 2, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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