toolcraft 0.0.72 → 0.0.74
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.
|
@@ -74,14 +74,24 @@ class ExplorerRuntime {
|
|
|
74
74
|
this.driver.enterAltScreen();
|
|
75
75
|
this.driver.disableLineWrap();
|
|
76
76
|
this.driver.hideCursor();
|
|
77
|
-
this.
|
|
78
|
-
this.dispatch({ type: "key", key });
|
|
79
|
-
});
|
|
77
|
+
this.subscribeKeypress();
|
|
80
78
|
this.unsubscribeResize = this.driver.onResize(() => {
|
|
81
79
|
const size = this.driver.getSize();
|
|
82
80
|
this.dispatch({ type: "resize", cols: size.cols, rows: size.rows });
|
|
83
81
|
});
|
|
84
82
|
}
|
|
83
|
+
subscribeKeypress() {
|
|
84
|
+
if (this.unsubscribeKeypress !== undefined) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
this.unsubscribeKeypress = this.driver.onKeypress((key) => {
|
|
88
|
+
this.dispatch({ type: "key", key });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
pauseKeypress() {
|
|
92
|
+
this.unsubscribeKeypress?.();
|
|
93
|
+
this.unsubscribeKeypress = undefined;
|
|
94
|
+
}
|
|
85
95
|
async loadRows(requestToken = ++this.rowsRequestToken) {
|
|
86
96
|
const rows = await this.config.rows();
|
|
87
97
|
if (requestToken === this.rowsRequestToken) {
|
|
@@ -161,7 +171,13 @@ class ExplorerRuntime {
|
|
|
161
171
|
if (typeof content === "string") {
|
|
162
172
|
return { ...item, renderedContent: content };
|
|
163
173
|
}
|
|
164
|
-
this.track(content.then((resolved) => this.dispatch({
|
|
174
|
+
this.track(content.then((resolved) => this.dispatch({
|
|
175
|
+
type: "detailItemRendered",
|
|
176
|
+
rowId,
|
|
177
|
+
token,
|
|
178
|
+
itemIndex,
|
|
179
|
+
content: resolved
|
|
180
|
+
}), (error) => this.dispatch({
|
|
165
181
|
type: "detailItemRendered",
|
|
166
182
|
rowId,
|
|
167
183
|
token,
|
|
@@ -204,6 +220,7 @@ class ExplorerRuntime {
|
|
|
204
220
|
}
|
|
205
221
|
}
|
|
206
222
|
async suspendAnd(fn) {
|
|
223
|
+
this.pauseKeypress();
|
|
207
224
|
this.driver.exitAltScreen();
|
|
208
225
|
this.driver.enableLineWrap();
|
|
209
226
|
this.driver.showCursor();
|
|
@@ -217,6 +234,7 @@ class ExplorerRuntime {
|
|
|
217
234
|
this.driver.enterAltScreen();
|
|
218
235
|
this.driver.disableLineWrap();
|
|
219
236
|
this.driver.hideCursor();
|
|
237
|
+
this.subscribeKeypress();
|
|
220
238
|
const size = this.driver.getSize();
|
|
221
239
|
this.dispatch({
|
|
222
240
|
type: "suspendResumed",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client mcp-oauth auth-store"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"toolcraft-schema": "0.0.
|
|
50
|
+
"toolcraft-schema": "0.0.74",
|
|
51
51
|
"commander": "^13.1.0",
|
|
52
52
|
"fast-string-width": "^3.0.2",
|
|
53
53
|
"fast-wrap-ansi": "^0.2.0",
|