Skip to content
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

Intercept Ollama errors before Webview, to display Download/Start options #3740

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

fbricon
Copy link
Contributor

@fbricon fbricon commented Jan 15, 2025

Fixes #3674

Description

Ollama specific errors are intercepted in VS Code's webviewProtocol class, before they're propagated to the webview, so they can be treated the same way as in #3653, and allow users to start or download Ollama if needed.

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Screenshots

Before:
Screenshot 2025-01-15 at 19 14 47

or, when #3725 is applied:
Screenshot 2025-01-15 at 12 24 14

After:
Screenshot 2025-01-15 at 18 59 17

Testing instructions

  • define an ollama model for chat
  • stop the ollama service
  • trying chatting

Copy link

netlify bot commented Jan 15, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit d9a1c05
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/67a27c3e8296180008c4b013

@fbricon
Copy link
Contributor Author

fbricon commented Jan 15, 2025

I decided to remove the Documentation option shown during completion failure, when ollama is not started:

  • so both chat and completion failures show the consistent messages
  • the documentation link is irrelevant when ollama is stopped

@fbricon
Copy link
Contributor Author

fbricon commented Jan 16, 2025

so actually this PR is based on top of #3725, leveraging the change in the respond signature (now allowing type any) https://github.com/continuedev/continue/pull/3725/files#diff-d513811389b8716365ea98f8def6c27c9a3ad66fab169690aeb5f67a40497a2dR58

So do not merge this before #3725, or else there will be a compilation error.

@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:00 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:01 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 06:03 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj temporarily deployed to tests-requiring-secrets February 1, 2025 09:46 — with GitHub Actions Inactive
@sestinj sestinj merged commit 1cbc0f0 into continuedev:main Feb 5, 2025
31 checks passed
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.

When Ollama is stopped, the chat window shows an unactionable error
2 participants