stashes 0.2.0 → 0.2.1
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 +14 -2
- package/dist/mcp.js +14 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -21994,7 +21994,11 @@ class StashService {
|
|
|
21994
21994
|
setSelectedComponent(component) {
|
|
21995
21995
|
this.selectedComponent = component;
|
|
21996
21996
|
if (component.filePath === "auto-detect") {
|
|
21997
|
-
this.resolveComponentFile(component)
|
|
21997
|
+
this.resolveComponentFile(component).catch((err) => {
|
|
21998
|
+
logger.error("component", "resolveComponentFile failed", {
|
|
21999
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22000
|
+
});
|
|
22001
|
+
});
|
|
21998
22002
|
}
|
|
21999
22003
|
}
|
|
22000
22004
|
async resolveComponentFile(component) {
|
|
@@ -22019,12 +22023,17 @@ class StashService {
|
|
|
22019
22023
|
id: "resolve-component",
|
|
22020
22024
|
prompt,
|
|
22021
22025
|
cwd: this.projectPath,
|
|
22022
|
-
model: "
|
|
22026
|
+
model: "haiku",
|
|
22023
22027
|
persistSession: false
|
|
22024
22028
|
})) {
|
|
22025
22029
|
if (chunk.type === "text")
|
|
22026
22030
|
resolvedPath += chunk.content;
|
|
22027
22031
|
}
|
|
22032
|
+
} catch (err) {
|
|
22033
|
+
logger.error("component", "resolve-component query failed", {
|
|
22034
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22035
|
+
});
|
|
22036
|
+
return;
|
|
22028
22037
|
} finally {
|
|
22029
22038
|
killAgentQuery("resolve-component");
|
|
22030
22039
|
}
|
|
@@ -22437,6 +22446,9 @@ ${sourceCode.substring(0, 3000)}
|
|
|
22437
22446
|
if (err instanceof Error && err.name === "AbortError") {
|
|
22438
22447
|
logger.info("chat", `chat query aborted for chatId: ${chatId}`);
|
|
22439
22448
|
} else {
|
|
22449
|
+
logger.error("chat", `chat query failed for chatId: ${chatId}`, {
|
|
22450
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22451
|
+
});
|
|
22440
22452
|
this.broadcast({
|
|
22441
22453
|
type: "ai_stream",
|
|
22442
22454
|
content: `Error: ${err instanceof Error ? err.message : String(err)}`,
|
package/dist/mcp.js
CHANGED
|
@@ -22218,7 +22218,11 @@ class StashService {
|
|
|
22218
22218
|
setSelectedComponent(component) {
|
|
22219
22219
|
this.selectedComponent = component;
|
|
22220
22220
|
if (component.filePath === "auto-detect") {
|
|
22221
|
-
this.resolveComponentFile(component)
|
|
22221
|
+
this.resolveComponentFile(component).catch((err) => {
|
|
22222
|
+
logger.error("component", "resolveComponentFile failed", {
|
|
22223
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22224
|
+
});
|
|
22225
|
+
});
|
|
22222
22226
|
}
|
|
22223
22227
|
}
|
|
22224
22228
|
async resolveComponentFile(component) {
|
|
@@ -22243,12 +22247,17 @@ class StashService {
|
|
|
22243
22247
|
id: "resolve-component",
|
|
22244
22248
|
prompt,
|
|
22245
22249
|
cwd: this.projectPath,
|
|
22246
|
-
model: "
|
|
22250
|
+
model: "haiku",
|
|
22247
22251
|
persistSession: false
|
|
22248
22252
|
})) {
|
|
22249
22253
|
if (chunk.type === "text")
|
|
22250
22254
|
resolvedPath += chunk.content;
|
|
22251
22255
|
}
|
|
22256
|
+
} catch (err) {
|
|
22257
|
+
logger.error("component", "resolve-component query failed", {
|
|
22258
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22259
|
+
});
|
|
22260
|
+
return;
|
|
22252
22261
|
} finally {
|
|
22253
22262
|
killAgentQuery("resolve-component");
|
|
22254
22263
|
}
|
|
@@ -22661,6 +22670,9 @@ ${sourceCode.substring(0, 3000)}
|
|
|
22661
22670
|
if (err instanceof Error && err.name === "AbortError") {
|
|
22662
22671
|
logger.info("chat", `chat query aborted for chatId: ${chatId}`);
|
|
22663
22672
|
} else {
|
|
22673
|
+
logger.error("chat", `chat query failed for chatId: ${chatId}`, {
|
|
22674
|
+
error: err instanceof Error ? err.message : String(err)
|
|
22675
|
+
});
|
|
22664
22676
|
this.broadcast({
|
|
22665
22677
|
type: "ai_stream",
|
|
22666
22678
|
content: `Error: ${err instanceof Error ? err.message : String(err)}`,
|