✨ jetbrains config reloading on save
This commit is contained in:
parent
d982f79143
commit
3d775633fa
5 changed files with 9 additions and 7 deletions
|
|
@ -52,10 +52,11 @@ export class ConfigHandler {
|
|||
console.warn("Failed to load workspace configs");
|
||||
}
|
||||
|
||||
const ideInfo = await this.ide.getIdeInfo();
|
||||
this.savedConfig = await loadFullConfigNode(
|
||||
this.ide.readFile,
|
||||
workspaceConfigs,
|
||||
(await this.ide.getIdeInfo()).ideType
|
||||
ideInfo.ideType
|
||||
);
|
||||
this.savedConfig.allowAnonymousTelemetry =
|
||||
this.savedConfig.allowAnonymousTelemetry &&
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export type Protocol = {
|
|||
Promise<BrowserSerializedContinueConfig>,
|
||||
];
|
||||
"config/deleteModel": [{ title: string }, void];
|
||||
"config/reload": [undefined, void];
|
||||
"config/reload": [undefined, Promise<BrowserSerializedContinueConfig>];
|
||||
"context/getContextItems": [
|
||||
{
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ class CoreMessenger(continueCorePath: String, ideProtocolClient: IdeProtocolClie
|
|||
"getSearchResults",
|
||||
"getProblems",
|
||||
"subprocess",
|
||||
"getBranch"
|
||||
"getBranch",
|
||||
"getIdeInfo"
|
||||
)
|
||||
|
||||
init {
|
||||
|
|
|
|||
|
|
@ -83,7 +83,10 @@ export class Core {
|
|||
on("config/deleteModel", (msg) => {
|
||||
deleteModel(msg.data.title);
|
||||
});
|
||||
on("config/reload", (msg) => {});
|
||||
on("config/reload", (msg) => {
|
||||
this.configHandler.reloadConfig();
|
||||
return this.configHandler.getSerializedConfig();
|
||||
});
|
||||
|
||||
// Context providers
|
||||
on("context/addDocs", async (msg) => {
|
||||
|
|
|
|||
|
|
@ -49,9 +49,6 @@ export class IpcMessenger {
|
|||
|
||||
// Call handler and respond with return value
|
||||
const listeners = this.typeListeners.get(msg.messageType as any);
|
||||
if (!listeners) {
|
||||
console.log("No listeners for messageType: ", msg.messageType);
|
||||
}
|
||||
listeners?.forEach(async (handler) => {
|
||||
try {
|
||||
const response = await handler(msg);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue