Update Astra: v2.80.19 - Refactoring Sidebar, LM Studio integration, and new tests
This commit is contained in:
@@ -7,10 +7,28 @@ const config = {
|
||||
}
|
||||
};
|
||||
|
||||
class EventEmitter {
|
||||
constructor() {
|
||||
this._listeners = [];
|
||||
this.event = (listener) => {
|
||||
this._listeners.push(listener);
|
||||
return { dispose: () => { this._listeners = this._listeners.filter(l => l !== listener); } };
|
||||
};
|
||||
}
|
||||
fire(value) {
|
||||
for (const l of this._listeners.slice()) l(value);
|
||||
}
|
||||
dispose() {
|
||||
this._listeners = [];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
EventEmitter,
|
||||
workspace: {
|
||||
workspaceFolders: [],
|
||||
getConfiguration: () => config,
|
||||
onDidChangeConfiguration: () => ({ dispose: () => {} }),
|
||||
fs: {
|
||||
writeFile: async () => {},
|
||||
delete: async () => {}
|
||||
|
||||
Reference in New Issue
Block a user