Skip to content

fix: allow extension to load when offline#27

Closed
k3-2o wants to merge 1 commit into
patlux:mainfrom
k3-2o:fix/offline-startup
Closed

fix: allow extension to load when offline#27
k3-2o wants to merge 1 commit into
patlux:mainfrom
k3-2o:fix/offline-startup

Conversation

@k3-2o

@k3-2o k3-2o commented Jul 23, 2026

Copy link
Copy Markdown

Problem

Pi refuses to start when offline because fetchCommandCodeModels() at extension init throws when it can't reach the API. This blocks the entire editor with:

Error: Failed to load extension: Unable to connect. Is the computer able to access the url?

Trade-off

Models won't appear in the model selector until the user runs /reload after reconnecting. This is documented in the changelog.

Testing

  • 38/39 existing tests pass (1 pre-existing flaky abort-timing test)
  • Verified manually: pi starts offline without error, /reload repopulates models when online

The model fetch at startup throws and blocks pi from starting when
there's no network. Catch the error and register the provider with
an empty model list instead.
@k3-2o
k3-2o force-pushed the fix/offline-startup branch from 71f853a to 811f908 Compare July 23, 2026 10:19
@k3-2o

k3-2o commented Jul 23, 2026

Copy link
Copy Markdown
Author

Closing based on what was read in issue #5 and PR #6.

But based on their new v1, these guys are slowly becoming pi — funny as hell. Only fair they let pi use the Go plan if it's an inspiration source 🤷

@k3-2o k3-2o closed this Jul 23, 2026
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.

1 participant