@ian2018cs/agenthub 0.1.95 → 0.1.96
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/package.json +1 -1
- package/server/claude-sdk.js +3 -2
package/package.json
CHANGED
package/server/claude-sdk.js
CHANGED
|
@@ -549,6 +549,7 @@ async function queryClaudeSDK(command, options = {}, ws) {
|
|
|
549
549
|
let sessionCreatedSent = false;
|
|
550
550
|
let tempImagePaths = [];
|
|
551
551
|
let tempDir = null;
|
|
552
|
+
let abortController = null;
|
|
552
553
|
|
|
553
554
|
// Set CLAUDE_CONFIG_DIR for user isolation
|
|
554
555
|
if (userUuid) {
|
|
@@ -562,7 +563,7 @@ async function queryClaudeSDK(command, options = {}, ws) {
|
|
|
562
563
|
const sdkOptions = mapCliOptionsToSDK(options);
|
|
563
564
|
|
|
564
565
|
// Create AbortController for session cancellation
|
|
565
|
-
|
|
566
|
+
abortController = new AbortController();
|
|
566
567
|
sdkOptions.abortController = abortController;
|
|
567
568
|
|
|
568
569
|
// Load MCP configuration
|
|
@@ -882,7 +883,7 @@ async function queryClaudeSDK(command, options = {}, ws) {
|
|
|
882
883
|
|
|
883
884
|
} catch (error) {
|
|
884
885
|
// If the session was aborted, this is expected — do not treat as an error.
|
|
885
|
-
if (abortController
|
|
886
|
+
if (abortController?.signal.aborted) {
|
|
886
887
|
console.log('Session aborted, ignoring post-abort error:', error.message);
|
|
887
888
|
if (capturedSessionId) {
|
|
888
889
|
removeSession(capturedSessionId);
|