flavor-code 1.2.17 → 1.2.20
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/README.md +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/{app-F4P7RV2X.js → app-5D5RSGQX.js} +47 -20
- package/dist/{chunk-YRIPE5K5.js → chunk-A7PMQ22O.js} +1 -1
- package/dist/{chunk-QQCXJC4U.js → chunk-AXLUVJKC.js} +784 -405
- package/dist/cli.js +3 -3
- package/dist/desktop/main.js +1063 -685
- package/dist/desktop/plugin-worker-entry.js +230 -0
- package/dist/evolve/loader.d.ts +1 -1
- package/dist/plugin-worker-entry.js +233 -0
- package/dist/plugins/host.d.ts +2 -3
- package/dist/plugins/sandbox-protocol.d.ts +72 -0
- package/dist/plugins/types.d.ts +3 -0
- package/dist/plugins/worker-host.d.ts +19 -0
- package/dist/production.d.ts +8 -0
- package/dist/sdk/index.js +2 -2
- package/dist/skills/arguments.d.ts +8 -0
- package/dist/skills/tool.d.ts +5 -0
- package/dist/ui/session.d.ts +1 -0
- package/dist/utils/async.d.ts +14 -0
- package/package.json +5 -4
package/dist/utils/async.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export interface TimeoutOutcome<T> {
|
|
2
|
+
/** True when the deadline passed before the promise settled. */
|
|
3
|
+
timedOut: boolean;
|
|
4
|
+
/** The promise value; undefined when timed out (or when the value itself is undefined). */
|
|
5
|
+
value: T | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Race a promise against a deadline. Settles like the promise when it finishes
|
|
9
|
+
* in time; when the deadline passes first it resolves with `{ timedOut: true }`.
|
|
10
|
+
* The timer is always cleared so it never keeps the event loop alive on its own.
|
|
11
|
+
* The underlying promise is NOT cancelled — it keeps running in the background —
|
|
12
|
+
* so only use this for work you are willing to abandon (e.g. shutdown cleanup).
|
|
13
|
+
*/
|
|
14
|
+
export declare function withTimeout<T>(promise: Promise<T>, ms: number): Promise<TimeoutOutcome<T>>;
|
|
1
15
|
/**
|
|
2
16
|
* Race a promise against an AbortSignal. If the signal fires before the
|
|
3
17
|
* promise settles the returned promise rejects with the signal's reason.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flavor-code",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.20",
|
|
4
4
|
"author": "YachuanWzh",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -56,9 +56,10 @@
|
|
|
56
56
|
"appId": "dev.flavorcode.desktop",
|
|
57
57
|
"productName": "Flavor Code",
|
|
58
58
|
"asar": true,
|
|
59
|
-
"asarUnpack": [
|
|
60
|
-
"dist/desktop/pixel-worker.js"
|
|
61
|
-
|
|
59
|
+
"asarUnpack": [
|
|
60
|
+
"dist/desktop/pixel-worker.js",
|
|
61
|
+
"dist/desktop/plugin-worker-entry.js"
|
|
62
|
+
],
|
|
62
63
|
"icon": "assets/icon",
|
|
63
64
|
"directories": {
|
|
64
65
|
"output": "release"
|