2 Commits
Author SHA1 Message Date
evanp 4fdaa0ca9d Merge pull request 'Abort in-flight requests when the chat is cancelled' (#1) from code/inference-coop-copilot:fix/abort-on-cancel into main
Reviewed-on: evanp/inference-coop-copilot#1
2026-11-07 04:07:19 +00:00
inference-bot 9798a41745 fix: abort in-flight chat requests on cancellation
Cancellation was only checked at POST time; once the SSE stream was
open the reader loop never looked at the token again, so a stopped
chat kept generating server-side (and billing) until the response
ended.

Wire an AbortController to token.onCancellationRequested, pass its
signal to fetch, and check token.isCancellationRequested at the top
of the reader loop so the connection closes as soon as the user
stops the request. AbortError is swallowed (a stop is not a
failure); real HTTP errors still surface, and the cancellation
listener is disposed in a finally.
2026-11-07 00:40:40 +00:00
7 changed files with 39 additions and 1569 deletions

No files matched your search

+5 -44
View File
@@ -10,44 +10,6 @@ and this project adheres to
## [Unreleased] ## [Unreleased]
### Added
- Set `baseContentUrl` in package.json to the Gitea raw URL, so LICENSE and
NOTICE links in the README resolve correctly on the Marketplace.
- Added an npm `publish` script running `vsce publish`, with `@vscode/vsce`
as a dev dependency, for releasing to the VS Code Marketplace.
- Added `language-models` and `chat` Marketplace tags, so the extension
appears in the "Install Language Models" discovery flow. The tags take
effect when the next version is published.
- Added an extension icon rendered from the Inference Coop logo, shown on
the Marketplace listing and in the Extensions view.
- Added Marketplace keywords for search discoverability.
- Changed the Marketplace category from "Other" to "AI".
### Removed
- Removed the unused `inferenceCoop.baseUrl` setting. The extension only
ever talked to the hardcoded `https://gateway.inference.coop/v1` gateway;
keeping a configurable URL would let a modified setting redirect the
stored API key to a hostile endpoint.
## [0.3.0] - 2026-11-08
### Changed
- Removed the "(unofficial)" disclaimer from the package description and
NOTICE, and the README; the project is now official, maintained in the
co-op's Git at `code/inference-coop-copilot`.
- Updated the repository URL to `https://git.inference.coop/code/inference-coop-copilot.git`
in package.json and CHANGELOG links.
### Fixed
- Abort in-flight chat requests on cancellation: an `AbortController` wired
to `token.onCancellationRequested` closes the SSE connection as soon as
the user stops the request, instead of the server continuing to generate
until the response ends.
## [0.2.2] - 2026-11-06 ## [0.2.2] - 2026-11-06
### Fixed ### Fixed
@@ -108,9 +70,8 @@ First release usable for chat.
Initial development release. Not functional for chat. Initial development release. Not functional for chat.
[Unreleased]: https://git.inference.coop/code/inference-coop-copilot/compare/v0.3.0...HEAD [Unreleased]: https://git.inference.coop/evanp/inference-coop-copilot/compare/v0.2.2...HEAD
[0.3.0]: https://git.inference.coop/code/inference-coop-copilot/compare/v0.2.2...v0.3.0 [0.2.2]: https://git.inference.coop/evanp/inference-coop-copilot/compare/v0.2.1...v0.2.2
[0.2.2]: https://git.inference.coop/code/inference-coop-copilot/compare/v0.2.1...v0.2.2 [0.2.1]: https://git.inference.coop/evanp/inference-coop-copilot/compare/v0.2.0...v0.2.1
[0.2.1]: https://git.inference.coop/code/inference-coop-copilot/compare/v0.2.0...v0.2.1 [0.2.0]: https://git.inference.coop/evanp/inference-coop-copilot/compare/v0.1.0...v0.2.0
[0.2.0]: https://git.inference.coop/code/inference-coop-copilot/compare/v0.1.0...v0.2.0 [0.1.0]: https://git.inference.coop/evanp/inference-coop-copilot/releases/tag/v0.1.0
[0.1.0]: https://git.inference.coop/code/inference-coop-copilot/releases/tag/v0.1.0
+1 -1
View File
@@ -1,4 +1,4 @@
Inference Coop Copilot Inference Coop Copilot (unofficial)
Copyright 2026 Evan Prodromou Copyright 2026 Evan Prodromou
Licensed under the Apache License, Version 2.0. Licensed under the Apache License, Version 2.0.
+7 -8
View File
@@ -1,11 +1,8 @@
# Inference Coop for Copilot Chat # Inference Coop for Copilot Chat (unofficial)
![Inference Coop](images/icon.png) Community-built model provider for [inference.coop](https://inference.coop),
usable in GitHub Copilot Chat. Not affiliated with or endorsed by the
Official model provider for [inference.coop](https://inference.coop), usable Inference Cooperative.
in GitHub Copilot Chat. An official project of the Inference Cooperative,
maintained in the co-op's Git at
[code/inference-coop-copilot](https://git.inference.coop/code/inference-coop-copilot).
## Requirements ## Requirements
@@ -23,7 +20,8 @@ Language Model Key" enabled, or these models will not appear.
2. Open Copilot Chat, click the model name, and pick an `inference-coop/…` 2. Open Copilot Chat, click the model name, and pick an `inference-coop/…`
model. Tool calling works, so agent mode is usable. model. Tool calling works, so agent mode is usable.
To sign out, run **Inference Coop: Sign Out**. To use a different gateway, set `inferenceCoop.baseUrl`. To sign out, run
**Inference Coop: Sign Out**.
## Limitations ## Limitations
@@ -32,6 +30,7 @@ To sign out, run **Inference Coop: Sign Out**.
context budgeting is approximate. context budgeting is approximate.
- No inline code completions. Copilot does not support third-party providers - No inline code completions. Copilot does not support third-party providers
for completions; this extension only adds chat models. for completions; this extension only adds chat models.
- Unofficial client. Report extension bugs here, not to the co-op.
## License ## License
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

-25
View File
@@ -1,25 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 130 130">
<rect width="130" height="130" rx="24" fill="#faf8f5"/>
<circle cx="65" cy="14" r="5" fill="#5b8c5a"/>
<circle cx="58" cy="30" r="6" fill="#7ab87a"/>
<circle cx="74" cy="30" r="4" fill="#6ba86b"/>
<circle cx="51.5" cy="46" r="6.5" fill="#5b8c5a"/>
<circle cx="65" cy="46" r="5" fill="#7ab87a"/>
<circle cx="81" cy="46" r="4" fill="#6ba86b"/>
<circle cx="44" cy="62" r="7" fill="#6ba86b"/>
<circle cx="61" cy="62" r="5.5" fill="#5b8c5a"/>
<circle cx="76" cy="62" r="4.5" fill="#7ab87a"/>
<circle cx="89.5" cy="62" r="3.5" fill="#6ba86b"/>
<circle cx="36.5" cy="78" r="7.5" fill="#5b8c5a"/>
<circle cx="54" cy="78" r="6" fill="#7ab87a"/>
<circle cx="70" cy="78" r="5" fill="#6ba86b"/>
<circle cx="84" cy="78" r="4" fill="#5b8c5a"/>
<circle cx="97.5" cy="78" r="3.5" fill="#7ab87a"/>
<circle cx="44" cy="94" r="6.5" fill="#6ba86b"/>
<circle cx="61" cy="94" r="5.5" fill="#5b8c5a"/>
<circle cx="76" cy="94" r="4.5" fill="#7ab87a"/>
<circle cx="89.5" cy="94" r="3.5" fill="#6ba86b"/>
<circle cx="51.5" cy="110" r="5.5" fill="#5b8c5a"/>
<circle cx="65" cy="110" r="4.5" fill="#7ab87a"/>
<circle cx="81" cy="110" r="3.5" fill="#6ba86b"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

+2 -1461
View File
File diff suppressed because it is too large. Load diff
+24 -30
View File
@@ -1,33 +1,19 @@
{ {
"name": "inference-coop-copilot", "name": "inference-coop-copilot",
"displayName": "inference-coop-copilot", "displayName": "inference-coop-copilot",
"description": "Inference.coop models for Copilot Chat", "description": "Inference.coop models for Copilot Chat (unofficial)",
"version": "0.3.0", "version": "0.2.2",
"icon": "images/icon.png",
"engines": { "engines": {
"vscode": "^1.145.0" "vscode": "^1.145.0"
}, },
"publisher": "evanp", "publisher": "evanp",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://git.inference.coop/code/inference-coop-copilot.git", "url": "https://git.inference.coop/evanp/inference-coop-copilot.git"
"baseContentUrl": "https://git.inference.coop/code/inference-coop-copilot/raw/branch/main"
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"categories": [ "categories": [
"AI" "Other"
],
"tags": [
"language-models",
"chat"
],
"keywords": [
"inference-coop",
"inference.coop",
"copilot",
"chat",
"language model",
"AI"
], ],
"activationEvents": [], "activationEvents": [],
"main": "./dist/extension.js", "main": "./dist/extension.js",
@@ -39,6 +25,10 @@
} }
], ],
"commands": [ "commands": [
{
"command": "inference-coop-copilot.helloWorld",
"title": "Hello World"
},
{ {
"command": "inferenceCoop.setKey", "command": "inferenceCoop.setKey",
"title": "Inference Coop: Set API Key" "title": "Inference Coop: Set API Key"
@@ -47,7 +37,17 @@
"command": "inferenceCoop.clearKey", "command": "inferenceCoop.clearKey",
"title": "Inference Coop: Sign Out" "title": "Inference Coop: Sign Out"
} }
] ],
"configuration": {
"title": "Inference Coop",
"properties": {
"inferenceCoop.baseUrl": {
"type": "string",
"default": "https://gateway.inference.coop/v1",
"description": "Gateway base URL. Leave default unless testing."
}
}
}
}, },
"scripts": { "scripts": {
"vscode:prepublish": "npm run package", "vscode:prepublish": "npm run package",
@@ -61,28 +61,22 @@
"pretest": "npm run compile-tests && npm run compile && npm run lint", "pretest": "npm run compile-tests && npm run compile && npm run lint",
"check-types": "tsc --noEmit", "check-types": "tsc --noEmit",
"lint": "eslint src", "lint": "eslint src",
"publish": "vsce publish",
"test": "vscode-test" "test": "vscode-test"
}, },
"devDependencies": { "devDependencies": {
"@types/vscode": "^1.145.0",
"@types/mocha": "^10.0.10", "@types/mocha": "^10.0.10",
"@types/node": "24.x", "@types/node": "24.x",
"@types/vscode": "^1.145.0", "typescript-eslint": "^8.61.1",
"@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0",
"@vscode/vsce": "^4.1.0",
"esbuild": "^0.28.1",
"eslint": "^10.5.0", "eslint": "^10.5.0",
"esbuild": "^0.28.1",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"typescript": "^6.0.3", "typescript": "^6.0.3",
"typescript-eslint": "^8.61.1" "@vscode/test-cli": "^0.0.15",
"@vscode/test-electron": "^3.0.0"
}, },
"overrides": { "overrides": {
"diff": "^8.0.4", "diff": "^8.0.4",
"serialize-javascript": "^7.0.6" "serialize-javascript": "^7.0.6"
},
"allowScripts": {
"@vscode/vsce-sign@2.1.0": true,
"esbuild@0.28.2": true
} }
} }