kimaki 0.4.0 → 0.4.2

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.
@@ -907,10 +907,10 @@ async function handleOpencodeSession(prompt, thread, projectDirectory, originalM
907
907
  const existingController = abortControllers.get(session.id);
908
908
  if (existingController) {
909
909
  voiceLogger.log(`[ABORT] Cancelling existing request for session: ${session.id}`);
910
- existingController.abort('New request started');
910
+ existingController.abort(new Error('New request started'));
911
911
  }
912
912
  if (abortControllers.has(session.id)) {
913
- abortControllers.get(session.id)?.abort('new reply');
913
+ abortControllers.get(session.id)?.abort(new Error('new reply'));
914
914
  }
915
915
  const abortController = new AbortController();
916
916
  // Store this controller for this session
@@ -1161,7 +1161,7 @@ async function handleOpencodeSession(prompt, thread, projectDirectory, originalM
1161
1161
  },
1162
1162
  signal: abortController.signal,
1163
1163
  });
1164
- abortController.abort('finished');
1164
+ abortController.abort(new Error('finished'));
1165
1165
  sessionLogger.log(`Successfully sent prompt, got response`);
1166
1166
  abortControllers.delete(session.id);
1167
1167
  // Update reaction to success
@@ -1180,7 +1180,7 @@ async function handleOpencodeSession(prompt, thread, projectDirectory, originalM
1180
1180
  catch (error) {
1181
1181
  sessionLogger.error(`ERROR: Failed to send prompt:`, error);
1182
1182
  if (!isAbortError(error, abortController.signal)) {
1183
- abortController.abort('error');
1183
+ abortController.abort(new Error('error'));
1184
1184
  if (originalMessage) {
1185
1185
  try {
1186
1186
  await originalMessage.reactions.removeAll();
package/package.json CHANGED
@@ -2,7 +2,18 @@
2
2
  "name": "kimaki",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "0.4.0",
5
+ "version": "0.4.2",
6
+ "scripts": {
7
+ "dev": "pnpm tsc && tsx --env-file .env src/cli.ts",
8
+ "prepublishOnly": "pnpm tsc",
9
+ "dev:bun": "DEBUG=1 bun --env-file .env src/cli.ts",
10
+ "test": "tsx scripts/test-opencode.ts",
11
+ "watch": "tsx scripts/watch-session.ts",
12
+ "test:events": "tsx test-events.ts",
13
+ "pcm-to-mp3": "bun scripts/pcm-to-mp3",
14
+ "test:send": "tsx send-test-message.ts",
15
+ "register-commands": "tsx scripts/register-commands.ts"
16
+ },
6
17
  "repository": "https://github.com/remorses/kimaki",
7
18
  "bin": "bin.js",
8
19
  "files": [
@@ -43,15 +54,5 @@
43
54
  "string-dedent": "^3.0.2",
44
55
  "undici": "^7.16.0",
45
56
  "zod": "^4.0.17"
46
- },
47
- "scripts": {
48
- "dev": "pnpm tsc && tsx --env-file .env src/cli.ts",
49
- "dev:bun": "DEBUG=1 bun --env-file .env src/cli.ts",
50
- "test": "tsx scripts/test-opencode.ts",
51
- "watch": "tsx scripts/watch-session.ts",
52
- "test:events": "tsx test-events.ts",
53
- "pcm-to-mp3": "bun scripts/pcm-to-mp3",
54
- "test:send": "tsx send-test-message.ts",
55
- "register-commands": "tsx scripts/register-commands.ts"
56
57
  }
57
- }
58
+ }
package/src/cli.ts CHANGED
File without changes
package/src/discordBot.ts CHANGED
@@ -1169,11 +1169,11 @@ async function handleOpencodeSession(
1169
1169
  voiceLogger.log(
1170
1170
  `[ABORT] Cancelling existing request for session: ${session.id}`,
1171
1171
  )
1172
- existingController.abort('New request started')
1172
+ existingController.abort(new Error('New request started'))
1173
1173
  }
1174
1174
 
1175
1175
  if (abortControllers.has(session.id)) {
1176
- abortControllers.get(session.id)?.abort('new reply')
1176
+ abortControllers.get(session.id)?.abort(new Error('new reply'))
1177
1177
  }
1178
1178
  const abortController = new AbortController()
1179
1179
  // Store this controller for this session
@@ -1494,7 +1494,7 @@ async function handleOpencodeSession(
1494
1494
  },
1495
1495
  signal: abortController.signal,
1496
1496
  })
1497
- abortController.abort('finished')
1497
+ abortController.abort(new Error('finished'))
1498
1498
 
1499
1499
  sessionLogger.log(`Successfully sent prompt, got response`)
1500
1500
 
@@ -1516,7 +1516,7 @@ async function handleOpencodeSession(
1516
1516
  sessionLogger.error(`ERROR: Failed to send prompt:`, error)
1517
1517
 
1518
1518
  if (!isAbortError(error, abortController.signal)) {
1519
- abortController.abort('error')
1519
+ abortController.abort(new Error('error'))
1520
1520
 
1521
1521
  if (originalMessage) {
1522
1522
  try {