Skip to content

Commit

Permalink
fix: Support vscode-notebook-cell in containers (#3826)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason3S authored Nov 20, 2024
1 parent f14769a commit b6cdfc7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions packages/_server/src/config/docUriHelper.mts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ export function handleSpecialUri(uri: Uri, rootUri: Uri): Uri {
export function forceToFileUri(uri: Uri, rootUri: Uri): Uri {
if (uri.scheme === 'file') return uri;

return uri.with({
scheme: rootUri.scheme,
query: '',
fragment: '',
return rootUri.with({
path: uri.path,
});
}

Expand Down
4 changes: 3 additions & 1 deletion packages/client/src/storage/mementoFile.mts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export class MementoFile<T> implements Memento<T>, Disposable {
#handleFileChange(uri: Uri) {
const a = uri.path;
const b = this.uri.path;
assert(a === b, `Invalid file change: ${a} !== ${b}`);
if (a !== b) {
console.error(`Invalid file change: '${a}' !== '${b}'`);
}
this.#loadData().catch(() => undefined);
}

Expand Down

0 comments on commit b6cdfc7

Please sign in to comment.