chat-heimerdinger 0.1.12 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +62 -43
- package/dist/daemon-entry.js +53 -34
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -110807,7 +110807,7 @@ var require_view2 = __commonJS((exports, module) => {
|
|
|
110807
110807
|
var debug = require_src4()("express:view");
|
|
110808
110808
|
var path = __require("node:path");
|
|
110809
110809
|
var fs = __require("node:fs");
|
|
110810
|
-
var
|
|
110810
|
+
var dirname3 = path.dirname;
|
|
110811
110811
|
var basename2 = path.basename;
|
|
110812
110812
|
var extname = path.extname;
|
|
110813
110813
|
var join3 = path.join;
|
|
@@ -110846,7 +110846,7 @@ var require_view2 = __commonJS((exports, module) => {
|
|
|
110846
110846
|
for (var i2 = 0;i2 < roots.length && !path2; i2++) {
|
|
110847
110847
|
var root = roots[i2];
|
|
110848
110848
|
var loc = resolve(root, name);
|
|
110849
|
-
var dir =
|
|
110849
|
+
var dir = dirname3(loc);
|
|
110850
110850
|
var file = basename2(loc);
|
|
110851
110851
|
path2 = this.resolve(dir, file);
|
|
110852
110852
|
}
|
|
@@ -117575,11 +117575,15 @@ function _getDefaultLogLevel() {
|
|
|
117575
117575
|
var consola = createConsola2();
|
|
117576
117576
|
|
|
117577
117577
|
// src/constants.ts
|
|
117578
|
+
import { readFileSync } from "node:fs";
|
|
117578
117579
|
import { homedir } from "node:os";
|
|
117579
|
-
import { join } from "node:path";
|
|
117580
|
+
import { join, dirname } from "node:path";
|
|
117581
|
+
import { fileURLToPath } from "node:url";
|
|
117582
|
+
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
117583
|
+
var pkg = JSON.parse(readFileSync(join(__dirname2, "..", "package.json"), "utf-8"));
|
|
117580
117584
|
var APP_NAME = "heimerdinger";
|
|
117581
117585
|
var CLI_NAME = "hmdg";
|
|
117582
|
-
var VERSION =
|
|
117586
|
+
var VERSION = pkg.version;
|
|
117583
117587
|
var HOME_DIR = homedir();
|
|
117584
117588
|
var CONFIG_DIR = join(HOME_DIR, ".heimerdinger");
|
|
117585
117589
|
var CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
@@ -118256,8 +118260,8 @@ var be = async (s2, n2) => {
|
|
|
118256
118260
|
};
|
|
118257
118261
|
|
|
118258
118262
|
// src/services/config-manager.ts
|
|
118259
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
118260
|
-
import { dirname } from "node:path";
|
|
118263
|
+
import { existsSync, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
|
|
118264
|
+
import { dirname as dirname2 } from "node:path";
|
|
118261
118265
|
class ConfigManager {
|
|
118262
118266
|
configPath;
|
|
118263
118267
|
config;
|
|
@@ -118270,7 +118274,7 @@ class ConfigManager {
|
|
|
118270
118274
|
if (!existsSync(this.configPath)) {
|
|
118271
118275
|
return { ...DEFAULT_CONFIG };
|
|
118272
118276
|
}
|
|
118273
|
-
const content =
|
|
118277
|
+
const content = readFileSync2(this.configPath, "utf-8");
|
|
118274
118278
|
if (!content.trim()) {
|
|
118275
118279
|
return { ...DEFAULT_CONFIG };
|
|
118276
118280
|
}
|
|
@@ -118292,7 +118296,7 @@ class ConfigManager {
|
|
|
118292
118296
|
};
|
|
118293
118297
|
}
|
|
118294
118298
|
save() {
|
|
118295
|
-
const dir =
|
|
118299
|
+
const dir = dirname2(this.configPath);
|
|
118296
118300
|
if (!existsSync(dir)) {
|
|
118297
118301
|
mkdirSync(dir, { recursive: true });
|
|
118298
118302
|
}
|
|
@@ -118636,7 +118640,7 @@ var initCommand = new Command("init").description("Initialize heimerdinger confi
|
|
|
118636
118640
|
|
|
118637
118641
|
// src/commands/logs.ts
|
|
118638
118642
|
import { spawn } from "node:child_process";
|
|
118639
|
-
import { existsSync as existsSync2, readFileSync as
|
|
118643
|
+
import { existsSync as existsSync2, readFileSync as readFileSync3 } from "node:fs";
|
|
118640
118644
|
var logsCommand = new Command("logs").description("View service logs").option("-f, --follow", "Follow log output").option("-n, --lines <number>", "Number of lines to show", "50").action(async (options) => {
|
|
118641
118645
|
if (!existsSync2(LOG_FILE)) {
|
|
118642
118646
|
consola.warn("No log file found. Service may not have been started yet.");
|
|
@@ -118659,7 +118663,7 @@ var logsCommand = new Command("logs").description("View service logs").option("-
|
|
|
118659
118663
|
proc.on("close", () => resolve());
|
|
118660
118664
|
});
|
|
118661
118665
|
} else {
|
|
118662
|
-
const content =
|
|
118666
|
+
const content = readFileSync3(LOG_FILE, "utf-8");
|
|
118663
118667
|
const allLines = content.split(`
|
|
118664
118668
|
`).filter(Boolean);
|
|
118665
118669
|
const lastLines = allLines.slice(-lines);
|
|
@@ -118677,7 +118681,7 @@ import { existsSync as existsSync4 } from "node:fs";
|
|
|
118677
118681
|
|
|
118678
118682
|
// src/services/claude-code.ts
|
|
118679
118683
|
import { execSync, spawn as spawn2 } from "node:child_process";
|
|
118680
|
-
import { existsSync as existsSync3, readFileSync as
|
|
118684
|
+
import { existsSync as existsSync3, readFileSync as readFileSync4, readdirSync } from "node:fs";
|
|
118681
118685
|
import { basename, join as join2 } from "node:path";
|
|
118682
118686
|
class ClaudeCodeService {
|
|
118683
118687
|
claudeConfigPath;
|
|
@@ -118756,7 +118760,7 @@ class ClaudeCodeService {
|
|
|
118756
118760
|
let mcpServers = {};
|
|
118757
118761
|
try {
|
|
118758
118762
|
if (existsSync3(this.claudeConfigPath)) {
|
|
118759
|
-
const content =
|
|
118763
|
+
const content = readFileSync4(this.claudeConfigPath, "utf-8");
|
|
118760
118764
|
const config = JSON.parse(content);
|
|
118761
118765
|
const projectConfig = config.projects?.[decodedPath];
|
|
118762
118766
|
if (projectConfig) {
|
|
@@ -118795,7 +118799,7 @@ class ClaudeCodeService {
|
|
|
118795
118799
|
if (!existsSync3(indexPath)) {
|
|
118796
118800
|
return [];
|
|
118797
118801
|
}
|
|
118798
|
-
const content =
|
|
118802
|
+
const content = readFileSync4(indexPath, "utf-8");
|
|
118799
118803
|
const index = JSON.parse(content);
|
|
118800
118804
|
return index.entries.sort((a3, b3) => new Date(b3.modified).getTime() - new Date(a3.modified).getTime());
|
|
118801
118805
|
} catch {
|
|
@@ -119086,12 +119090,12 @@ var projectsCommand = new Command("projects").description("List Claude Code proj
|
|
|
119086
119090
|
|
|
119087
119091
|
// src/commands/start.ts
|
|
119088
119092
|
import { spawnSync } from "node:child_process";
|
|
119089
|
-
import { dirname as
|
|
119093
|
+
import { dirname as dirname4, join as join5 } from "node:path";
|
|
119090
119094
|
|
|
119091
119095
|
// src/services/service-manager.ts
|
|
119092
119096
|
import { execSync as execSync3, spawn as spawn4 } from "node:child_process";
|
|
119093
|
-
import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as
|
|
119094
|
-
import { dirname as
|
|
119097
|
+
import { existsSync as existsSync8, mkdirSync as mkdirSync3, readFileSync as readFileSync6, unlinkSync as unlinkSync3, writeFileSync as writeFileSync5 } from "node:fs";
|
|
119098
|
+
import { dirname as dirname3, join as join4 } from "node:path";
|
|
119095
119099
|
|
|
119096
119100
|
// src/services/server.ts
|
|
119097
119101
|
import { existsSync as existsSync7, unlinkSync as unlinkSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
@@ -119833,6 +119837,9 @@ class SlackAdapter {
|
|
|
119833
119837
|
socketMode: config.socketMode,
|
|
119834
119838
|
appToken: config.appToken
|
|
119835
119839
|
});
|
|
119840
|
+
this.app.error(async (error) => {
|
|
119841
|
+
consola.error("Slack Bolt error:", error);
|
|
119842
|
+
});
|
|
119836
119843
|
this.setupEventHandlers();
|
|
119837
119844
|
}
|
|
119838
119845
|
async init() {}
|
|
@@ -119998,35 +120005,47 @@ class SlackAdapter {
|
|
|
119998
120005
|
});
|
|
119999
120006
|
this.app.command("/project", async ({ command, ack }) => {
|
|
120000
120007
|
await ack();
|
|
120001
|
-
consola.
|
|
120002
|
-
|
|
120003
|
-
|
|
120004
|
-
|
|
120005
|
-
|
|
120006
|
-
|
|
120007
|
-
|
|
120008
|
+
consola.info(`Slash command /project from channel: ${command.channel_id}`);
|
|
120009
|
+
try {
|
|
120010
|
+
const context = {
|
|
120011
|
+
channelId: command.channel_id,
|
|
120012
|
+
userId: command.user_id
|
|
120013
|
+
};
|
|
120014
|
+
for (const handler of this.interactionHandlers) {
|
|
120015
|
+
await handler("show_project_selector", "", context);
|
|
120016
|
+
}
|
|
120017
|
+
} catch (error) {
|
|
120018
|
+
consola.error("Error handling /project command:", error);
|
|
120008
120019
|
}
|
|
120009
120020
|
});
|
|
120010
120021
|
this.app.command("/stop", async ({ command, ack }) => {
|
|
120011
120022
|
await ack();
|
|
120012
|
-
consola.
|
|
120013
|
-
|
|
120014
|
-
|
|
120015
|
-
|
|
120016
|
-
|
|
120017
|
-
|
|
120018
|
-
|
|
120023
|
+
consola.info(`Slash command /stop from channel: ${command.channel_id}`);
|
|
120024
|
+
try {
|
|
120025
|
+
const context = {
|
|
120026
|
+
channelId: command.channel_id,
|
|
120027
|
+
userId: command.user_id
|
|
120028
|
+
};
|
|
120029
|
+
for (const handler of this.interactionHandlers) {
|
|
120030
|
+
await handler("stop_execution", "", context);
|
|
120031
|
+
}
|
|
120032
|
+
} catch (error) {
|
|
120033
|
+
consola.error("Error handling /stop command:", error);
|
|
120019
120034
|
}
|
|
120020
120035
|
});
|
|
120021
120036
|
this.app.command("/clear", async ({ command, ack }) => {
|
|
120022
120037
|
await ack();
|
|
120023
|
-
consola.
|
|
120024
|
-
|
|
120025
|
-
|
|
120026
|
-
|
|
120027
|
-
|
|
120028
|
-
|
|
120029
|
-
|
|
120038
|
+
consola.info(`Slash command /clear from channel: ${command.channel_id}`);
|
|
120039
|
+
try {
|
|
120040
|
+
const context = {
|
|
120041
|
+
channelId: command.channel_id,
|
|
120042
|
+
userId: command.user_id
|
|
120043
|
+
};
|
|
120044
|
+
for (const handler of this.interactionHandlers) {
|
|
120045
|
+
await handler("clear_session", "", context);
|
|
120046
|
+
}
|
|
120047
|
+
} catch (error) {
|
|
120048
|
+
consola.error("Error handling /clear command:", error);
|
|
120030
120049
|
}
|
|
120031
120050
|
});
|
|
120032
120051
|
}
|
|
@@ -120182,7 +120201,7 @@ class SlackAdapter {
|
|
|
120182
120201
|
}
|
|
120183
120202
|
|
|
120184
120203
|
// src/services/message-processor.ts
|
|
120185
|
-
import { existsSync as existsSync6, readFileSync as
|
|
120204
|
+
import { existsSync as existsSync6, readFileSync as readFileSync5, writeFileSync as writeFileSync3 } from "node:fs";
|
|
120186
120205
|
|
|
120187
120206
|
// src/services/whisper.ts
|
|
120188
120207
|
import { execSync as execSync2, spawn as spawn3 } from "node:child_process";
|
|
@@ -120349,7 +120368,7 @@ class MessageProcessor {
|
|
|
120349
120368
|
loadState() {
|
|
120350
120369
|
try {
|
|
120351
120370
|
if (existsSync6(SESSIONS_STATE_FILE)) {
|
|
120352
|
-
const content =
|
|
120371
|
+
const content = readFileSync5(SESSIONS_STATE_FILE, "utf-8");
|
|
120353
120372
|
const state = JSON.parse(content);
|
|
120354
120373
|
for (const [channel, channelState] of Object.entries(state.channels || {})) {
|
|
120355
120374
|
this.userStates.set(channel, channelState);
|
|
@@ -121500,7 +121519,7 @@ Shutting down...`);
|
|
|
121500
121519
|
mkdirSync3(LOG_DIR, { recursive: true });
|
|
121501
121520
|
}
|
|
121502
121521
|
const cliPath = new URL(import.meta.url).pathname;
|
|
121503
|
-
const distDir =
|
|
121522
|
+
const distDir = dirname3(cliPath);
|
|
121504
121523
|
const daemonScript = join4(distDir, "daemon-entry.js");
|
|
121505
121524
|
consola.debug("Daemon paths:", { distDir, daemonScript, LOG_FILE });
|
|
121506
121525
|
if (!existsSync8(daemonScript)) {
|
|
@@ -121568,7 +121587,7 @@ Shutting down...`);
|
|
|
121568
121587
|
} catch {}
|
|
121569
121588
|
}
|
|
121570
121589
|
async writePidFile(pid) {
|
|
121571
|
-
const dir =
|
|
121590
|
+
const dir = dirname3(this.pidFile);
|
|
121572
121591
|
if (!existsSync8(dir)) {
|
|
121573
121592
|
mkdirSync3(dir, { recursive: true });
|
|
121574
121593
|
}
|
|
@@ -121579,7 +121598,7 @@ Shutting down...`);
|
|
|
121579
121598
|
if (!existsSync8(this.pidFile)) {
|
|
121580
121599
|
return null;
|
|
121581
121600
|
}
|
|
121582
|
-
const content =
|
|
121601
|
+
const content = readFileSync6(this.pidFile, "utf-8");
|
|
121583
121602
|
const pid = Number.parseInt(content.trim(), 10);
|
|
121584
121603
|
return Number.isNaN(pid) ? null : pid;
|
|
121585
121604
|
} catch {
|
|
@@ -121648,7 +121667,7 @@ var startCommand = new Command("start").description("Start the heimerdinger serv
|
|
|
121648
121667
|
consola.info(`Press Ctrl+C to stop.
|
|
121649
121668
|
`);
|
|
121650
121669
|
const cliPath = new URL(import.meta.url).pathname;
|
|
121651
|
-
const projectRoot =
|
|
121670
|
+
const projectRoot = dirname4(dirname4(cliPath));
|
|
121652
121671
|
const serverScript = join5(projectRoot, "src", "services", "daemon-entry.ts");
|
|
121653
121672
|
const tsxPath = join5(projectRoot, "node_modules", ".bin", "tsx");
|
|
121654
121673
|
const result = spawnSync(tsxPath, [serverScript], {
|
package/dist/daemon-entry.js
CHANGED
|
@@ -108645,7 +108645,7 @@ var require_view2 = __commonJS((exports, module) => {
|
|
|
108645
108645
|
var debug = require_src3()("express:view");
|
|
108646
108646
|
var path = __require("node:path");
|
|
108647
108647
|
var fs = __require("node:fs");
|
|
108648
|
-
var
|
|
108648
|
+
var dirname3 = path.dirname;
|
|
108649
108649
|
var basename = path.basename;
|
|
108650
108650
|
var extname = path.extname;
|
|
108651
108651
|
var join2 = path.join;
|
|
@@ -108684,7 +108684,7 @@ var require_view2 = __commonJS((exports, module) => {
|
|
|
108684
108684
|
for (var i2 = 0;i2 < roots.length && !path2; i2++) {
|
|
108685
108685
|
var root = roots[i2];
|
|
108686
108686
|
var loc = resolve(root, name);
|
|
108687
|
-
var dir =
|
|
108687
|
+
var dir = dirname3(loc);
|
|
108688
108688
|
var file = basename(loc);
|
|
108689
108689
|
path2 = this.resolve(dir, file);
|
|
108690
108690
|
}
|
|
@@ -115397,13 +115397,17 @@ function _getDefaultLogLevel() {
|
|
|
115397
115397
|
var consola = createConsola2();
|
|
115398
115398
|
|
|
115399
115399
|
// src/services/config-manager.ts
|
|
115400
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
115401
|
-
import { dirname } from "node:path";
|
|
115400
|
+
import { existsSync, mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
|
|
115401
|
+
import { dirname as dirname2 } from "node:path";
|
|
115402
115402
|
|
|
115403
115403
|
// src/constants.ts
|
|
115404
|
+
import { readFileSync } from "node:fs";
|
|
115404
115405
|
import { homedir } from "node:os";
|
|
115405
|
-
import { join } from "node:path";
|
|
115406
|
-
|
|
115406
|
+
import { join, dirname } from "node:path";
|
|
115407
|
+
import { fileURLToPath } from "node:url";
|
|
115408
|
+
var __dirname2 = dirname(fileURLToPath(import.meta.url));
|
|
115409
|
+
var pkg = JSON.parse(readFileSync(join(__dirname2, "..", "package.json"), "utf-8"));
|
|
115410
|
+
var VERSION = pkg.version;
|
|
115407
115411
|
var HOME_DIR = homedir();
|
|
115408
115412
|
var CONFIG_DIR = join(HOME_DIR, ".heimerdinger");
|
|
115409
115413
|
var CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
@@ -115457,7 +115461,7 @@ class ConfigManager {
|
|
|
115457
115461
|
if (!existsSync(this.configPath)) {
|
|
115458
115462
|
return { ...DEFAULT_CONFIG };
|
|
115459
115463
|
}
|
|
115460
|
-
const content =
|
|
115464
|
+
const content = readFileSync2(this.configPath, "utf-8");
|
|
115461
115465
|
if (!content.trim()) {
|
|
115462
115466
|
return { ...DEFAULT_CONFIG };
|
|
115463
115467
|
}
|
|
@@ -115479,7 +115483,7 @@ class ConfigManager {
|
|
|
115479
115483
|
};
|
|
115480
115484
|
}
|
|
115481
115485
|
save() {
|
|
115482
|
-
const dir =
|
|
115486
|
+
const dir = dirname2(this.configPath);
|
|
115483
115487
|
if (!existsSync(dir)) {
|
|
115484
115488
|
mkdirSync(dir, { recursive: true });
|
|
115485
115489
|
}
|
|
@@ -116266,6 +116270,9 @@ class SlackAdapter {
|
|
|
116266
116270
|
socketMode: config.socketMode,
|
|
116267
116271
|
appToken: config.appToken
|
|
116268
116272
|
});
|
|
116273
|
+
this.app.error(async (error) => {
|
|
116274
|
+
consola.error("Slack Bolt error:", error);
|
|
116275
|
+
});
|
|
116269
116276
|
this.setupEventHandlers();
|
|
116270
116277
|
}
|
|
116271
116278
|
async init() {}
|
|
@@ -116431,35 +116438,47 @@ class SlackAdapter {
|
|
|
116431
116438
|
});
|
|
116432
116439
|
this.app.command("/project", async ({ command, ack }) => {
|
|
116433
116440
|
await ack();
|
|
116434
|
-
consola.
|
|
116435
|
-
|
|
116436
|
-
|
|
116437
|
-
|
|
116438
|
-
|
|
116439
|
-
|
|
116440
|
-
|
|
116441
|
+
consola.info(`Slash command /project from channel: ${command.channel_id}`);
|
|
116442
|
+
try {
|
|
116443
|
+
const context = {
|
|
116444
|
+
channelId: command.channel_id,
|
|
116445
|
+
userId: command.user_id
|
|
116446
|
+
};
|
|
116447
|
+
for (const handler of this.interactionHandlers) {
|
|
116448
|
+
await handler("show_project_selector", "", context);
|
|
116449
|
+
}
|
|
116450
|
+
} catch (error) {
|
|
116451
|
+
consola.error("Error handling /project command:", error);
|
|
116441
116452
|
}
|
|
116442
116453
|
});
|
|
116443
116454
|
this.app.command("/stop", async ({ command, ack }) => {
|
|
116444
116455
|
await ack();
|
|
116445
|
-
consola.
|
|
116446
|
-
|
|
116447
|
-
|
|
116448
|
-
|
|
116449
|
-
|
|
116450
|
-
|
|
116451
|
-
|
|
116456
|
+
consola.info(`Slash command /stop from channel: ${command.channel_id}`);
|
|
116457
|
+
try {
|
|
116458
|
+
const context = {
|
|
116459
|
+
channelId: command.channel_id,
|
|
116460
|
+
userId: command.user_id
|
|
116461
|
+
};
|
|
116462
|
+
for (const handler of this.interactionHandlers) {
|
|
116463
|
+
await handler("stop_execution", "", context);
|
|
116464
|
+
}
|
|
116465
|
+
} catch (error) {
|
|
116466
|
+
consola.error("Error handling /stop command:", error);
|
|
116452
116467
|
}
|
|
116453
116468
|
});
|
|
116454
116469
|
this.app.command("/clear", async ({ command, ack }) => {
|
|
116455
116470
|
await ack();
|
|
116456
|
-
consola.
|
|
116457
|
-
|
|
116458
|
-
|
|
116459
|
-
|
|
116460
|
-
|
|
116461
|
-
|
|
116462
|
-
|
|
116471
|
+
consola.info(`Slash command /clear from channel: ${command.channel_id}`);
|
|
116472
|
+
try {
|
|
116473
|
+
const context = {
|
|
116474
|
+
channelId: command.channel_id,
|
|
116475
|
+
userId: command.user_id
|
|
116476
|
+
};
|
|
116477
|
+
for (const handler of this.interactionHandlers) {
|
|
116478
|
+
await handler("clear_session", "", context);
|
|
116479
|
+
}
|
|
116480
|
+
} catch (error) {
|
|
116481
|
+
consola.error("Error handling /clear command:", error);
|
|
116463
116482
|
}
|
|
116464
116483
|
});
|
|
116465
116484
|
}
|
|
@@ -116615,11 +116634,11 @@ class SlackAdapter {
|
|
|
116615
116634
|
}
|
|
116616
116635
|
|
|
116617
116636
|
// src/services/message-processor.ts
|
|
116618
|
-
import { existsSync as existsSync4, readFileSync as
|
|
116637
|
+
import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "node:fs";
|
|
116619
116638
|
|
|
116620
116639
|
// src/services/claude-code.ts
|
|
116621
116640
|
import { execSync, spawn } from "node:child_process";
|
|
116622
|
-
import { existsSync as existsSync2, readFileSync as
|
|
116641
|
+
import { existsSync as existsSync2, readFileSync as readFileSync3, readdirSync } from "node:fs";
|
|
116623
116642
|
import { basename, join as join2 } from "node:path";
|
|
116624
116643
|
class ClaudeCodeService {
|
|
116625
116644
|
claudeConfigPath;
|
|
@@ -116698,7 +116717,7 @@ class ClaudeCodeService {
|
|
|
116698
116717
|
let mcpServers = {};
|
|
116699
116718
|
try {
|
|
116700
116719
|
if (existsSync2(this.claudeConfigPath)) {
|
|
116701
|
-
const content =
|
|
116720
|
+
const content = readFileSync3(this.claudeConfigPath, "utf-8");
|
|
116702
116721
|
const config = JSON.parse(content);
|
|
116703
116722
|
const projectConfig = config.projects?.[decodedPath];
|
|
116704
116723
|
if (projectConfig) {
|
|
@@ -116737,7 +116756,7 @@ class ClaudeCodeService {
|
|
|
116737
116756
|
if (!existsSync2(indexPath)) {
|
|
116738
116757
|
return [];
|
|
116739
116758
|
}
|
|
116740
|
-
const content =
|
|
116759
|
+
const content = readFileSync3(indexPath, "utf-8");
|
|
116741
116760
|
const index = JSON.parse(content);
|
|
116742
116761
|
return index.entries.sort((a2, b2) => new Date(b2.modified).getTime() - new Date(a2.modified).getTime());
|
|
116743
116762
|
} catch {
|
|
@@ -117087,7 +117106,7 @@ class MessageProcessor {
|
|
|
117087
117106
|
loadState() {
|
|
117088
117107
|
try {
|
|
117089
117108
|
if (existsSync4(SESSIONS_STATE_FILE)) {
|
|
117090
|
-
const content =
|
|
117109
|
+
const content = readFileSync4(SESSIONS_STATE_FILE, "utf-8");
|
|
117091
117110
|
const state = JSON.parse(content);
|
|
117092
117111
|
for (const [channel, channelState] of Object.entries(state.channels || {})) {
|
|
117093
117112
|
this.userStates.set(channel, channelState);
|