@nimiplatform/app-tools 0.14.0 → 0.16.0-rc.12
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 +112 -24
- package/bin/nimi-app.mjs +35 -15
- package/lib/app-access-declaration.mjs +3 -0
- package/lib/app-dependency-combinations.mjs +70 -24
- package/lib/app-doctor-update.mjs +97 -39
- package/lib/app-host-support.mjs +6 -0
- package/lib/app-identifiers.mjs +27 -0
- package/lib/app-info.mjs +292 -1
- package/lib/app-lifecycle-guidance.mjs +1 -1
- package/lib/app-pack.mjs +65 -39
- package/lib/app-project-lifecycle.mjs +149 -244
- package/lib/app-scaffold-capabilities.mjs +13 -109
- package/lib/app-scaffold-profiles.mjs +81 -115
- package/lib/app-scaffold.mjs +74 -166
- package/lib/app-toolchain-updates.mjs +45 -0
- package/lib/canonical-capability-ids.generated.mjs +2 -0
- package/lib/development-environment.d.mts +10 -0
- package/lib/development-environment.mjs +39 -0
- package/lib/hosted-web-release.mjs +98 -0
- package/lib/index.mjs +43 -3
- package/lib/mobile-development.mjs +19 -0
- package/lib/realm-environments.generated.mjs +5 -0
- package/lib/storefront-media.mjs +154 -0
- package/lib/web-coordination.mjs +59 -0
- package/lib/web-development.d.mts +23 -0
- package/lib/web-development.mjs +118 -0
- package/lib/web-scaffold.mjs +125 -0
- package/package.json +33 -21
- package/scripts/dev-shell.mjs +4 -1
- package/scripts/sync-scaffold-versions.mjs +0 -2
- package/skills/nimi-app-lifecycle/SKILL.md +3 -1
- package/skills/nimi-app-lifecycle/references/acceptance.md +6 -2
- package/skills/nimi-app-lifecycle/references/adapt.md +5 -3
- package/skills/nimi-app-lifecycle/references/audit.md +3 -2
- package/skills/nimi-app-lifecycle/references/create.md +6 -2
- package/skills/nimi-app-lifecycle/references/release.md +10 -0
- package/skills/nimi-app-lifecycle/references/upgrade-platform.md +12 -7
- package/templates/app-source/src/ai-studio-core/ai-studio-core.css +87 -52
- package/templates/app-source/src/ai-studio-core/history-policy.ts +45 -11
- package/templates/app-source/src/ai-studio-core/history.ts +22 -11
- package/templates/app-source/src/ai-studio-core/host-context.tsx +9 -4
- package/templates/app-source/src/ai-studio-core/index.ts +2 -0
- package/templates/app-source/src/ai-studio-core/job-recovery-panel.tsx +15 -5
- package/templates/app-source/src/ai-studio-core/job-recovery.ts +2 -2
- package/templates/app-source/src/ai-studio-core/messages/en.json +73 -19
- package/templates/app-source/src/ai-studio-core/messages/zh.json +73 -19
- package/templates/app-source/src/ai-studio-core/module-registration.ts +1 -0
- package/templates/app-source/src/ai-studio-core/non-success-presentation.ts +30 -5
- package/templates/app-source/src/ai-studio-core/parameter-fields.tsx +12 -6
- package/templates/app-source/src/ai-studio-core/parameters.ts +4 -0
- package/templates/app-source/src/ai-studio-core/prompt-drafts.ts +42 -0
- package/templates/app-source/src/ai-studio-core/runtime-types.ts +9 -2
- package/templates/app-source/src/ai-studio-core/runtime.ts +8 -4
- package/templates/app-source/src/ai-studio-core/section-ai-testing-composer.tsx +98 -90
- package/templates/app-source/src/ai-studio-core/section-ai-testing-exchange-result.tsx +1 -1
- package/templates/app-source/src/ai-studio-core/section-ai-testing-history.tsx +205 -48
- package/templates/app-source/src/ai-studio-core/section-ai-testing-input.ts +1 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-output.tsx +36 -14
- package/templates/app-source/src/ai-studio-core/section-ai-testing-result.tsx +96 -75
- package/templates/app-source/src/ai-studio-core/section-ai-testing-run.ts +59 -16
- package/templates/app-source/src/ai-studio-core/section-ai-testing-session-result.tsx +2 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-studio-result.tsx +12 -21
- package/templates/app-source/src/ai-studio-core/section-ai-testing-transcription-result.tsx +2 -2
- package/templates/app-source/src/ai-studio-core/section-ai-testing-vision-result.tsx +3 -3
- package/templates/app-source/src/ai-studio-core/section-ai-testing.tsx +158 -76
- package/templates/app-source/src/ai-studio-core/workspace.tsx +49 -22
- package/templates/app-source/src/product-modules/agent-center/index.tsx +2 -3
- package/templates/app-source/src/product-modules/agent-conversation/index.tsx +2 -3
- package/templates/app-source/src/studio-modules/studio-create/messages/en.json +12 -3
- package/templates/app-source/src/studio-modules/studio-create/messages/zh.json +12 -3
- package/templates/app-source/src/studio-modules/studio-create/parameter-panel.tsx +11 -2
- package/templates/app-source/src/studio-modules/studio-create/parameters.ts +2 -1
- package/templates/app-source/src/studio-modules/studio-create/runtime.ts +47 -5
- package/templates/app-source/src/studio-modules/studio-media/messages/en.json +59 -8
- package/templates/app-source/src/studio-modules/studio-media/messages/zh.json +68 -8
- package/templates/app-source/src/studio-modules/studio-media/music-parameters.tsx +2 -1
- package/templates/app-source/src/studio-modules/studio-media/parameter-panel.tsx +271 -83
- package/templates/app-source/src/studio-modules/studio-media/parameters.ts +120 -2
- package/templates/app-source/src/studio-modules/studio-media/registration.ts +1 -0
- package/templates/app-source/src/studio-modules/studio-media/runtime.ts +24 -14
- package/templates/app-source/src/studio-modules/studio-voice/descriptors.ts +1 -1
- package/templates/app-source/src/studio-modules/studio-voice/messages/en.json +3 -2
- package/templates/app-source/src/studio-modules/studio-voice/messages/zh.json +3 -2
- package/templates/app-source/src/studio-modules/studio-voice/parameter-panel.tsx +46 -23
- package/templates/app-source/src/studio-modules/studio-voice/registration.ts +2 -1
- package/templates/app-source/src/studio-modules/studio-voice/runtime.ts +2 -2
- package/templates/app-source/src/workbench-core/workbench-core.tsx +27 -3
- package/templates/default-starter/AGENTS.md +3 -3
- package/templates/default-starter/README.md +1 -1
- package/templates/default-starter/src/shell/App.tsx +6 -18
- package/templates/default-starter/src/shell/auth/local-app-client.ts +6 -15
- package/templates/default-starter/src/shell/auth/runtime-platform.ts +7 -107
- package/templates/default-starter/src/shell/workbench-target-adapter.ts +9 -126
- package/templates/default-starter.manifest.json +0 -16
- package/templates/hosted-web-release.yml +98 -0
- package/templates/default-starter/src-tauri/Cargo.toml +0 -17
- package/templates/default-starter/src-tauri/build.rs +0 -32
- package/templates/default-starter/src-tauri/capabilities/default.json +0 -7
- package/templates/default-starter/src-tauri/tauri.conf.json +0 -26
|
@@ -33,7 +33,7 @@ export type StudioJobRecoveryDetails = {
|
|
|
33
33
|
readonly texts?: readonly string[];
|
|
34
34
|
readonly faceSwap?: import('./runtime-types.js').StudioFaceSwap;
|
|
35
35
|
};
|
|
36
|
-
const paths = { 'audio.speaker.embed': 'studio/speaker-embedding-recovery.json', 'image.generate': 'studio/image-recovery.json', 'video.generate': 'studio/video-recovery.json', 'audio.synthesize': 'studio/speech-recovery.json', 'audio.transcribe': 'studio/transcript-recovery.json', 'voice.create': 'studio/voice-recovery.json', 'vision.locate': 'studio/locate-recovery.json', 'text.annotate': 'studio/annotation-recovery.json', 'image.face_swap': 'studio/image-face-recovery.json', 'video.face_swap': 'studio/video-face-recovery.json', 'music.generate': 'studio/music-recovery.json', 'music.transcribe': 'studio/music-transcription-recovery.json', 'audio.voice.convert': 'studio/voice-convert-recovery.json', 'audio.separate': 'studio/audio-separation-recovery.json' };
|
|
36
|
+
const paths = { 'image.upscale': 'studio/image-upscale-recovery.json', 'video.upscale': 'studio/video-upscale-recovery.json', 'audio.speaker.embed': 'studio/speaker-embedding-recovery.json', 'image.generate': 'studio/image-recovery.json', 'video.generate': 'studio/video-recovery.json', 'audio.synthesize': 'studio/speech-recovery.json', 'audio.transcribe': 'studio/transcript-recovery.json', 'voice.create': 'studio/voice-recovery.json', 'vision.locate': 'studio/locate-recovery.json', 'text.annotate': 'studio/annotation-recovery.json', 'image.face_swap': 'studio/image-face-recovery.json', 'video.face_swap': 'studio/video-face-recovery.json', 'music.generate': 'studio/music-recovery.json', 'music.transcribe': 'studio/music-transcription-recovery.json', 'audio.voice.convert': 'studio/voice-convert-recovery.json', 'audio.separate': 'studio/audio-separation-recovery.json' };
|
|
37
37
|
let mutationTail: Promise<unknown> = Promise.resolve();
|
|
38
38
|
|
|
39
39
|
export async function readStudioJobRecovery(storage: Storage, capability: StudioJobRecoveryCapability = 'music.generate'): Promise<readonly StudioJobRecoveryEntry[]> {
|
|
@@ -186,7 +186,7 @@ export function recordedStudioScenarioJobClient(context: import('./runtime.js').
|
|
|
186
186
|
} });
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export async function recoverStudioJobId(client: NimiLocalAppClient, entry: StudioJobRecoveryEntry, capability: StudioJobRecoveryCapability): Promise<string> {
|
|
189
|
+
export async function recoverStudioJobId(client: { readonly ai: Pick<NimiLocalAppClient['ai'], 'scenarioJobs'>; readonly storage: Storage }, entry: StudioJobRecoveryEntry, capability: StudioJobRecoveryCapability): Promise<string> {
|
|
190
190
|
const response = entry.jobId ? await client.ai.scenarioJobs.get(entry.jobId) : await client.ai.scenarioJobs.lookupSubmission(entry.clientSubmissionId);
|
|
191
191
|
await captureStudioJobRecoveryJobId(client.storage, entry.clientSubmissionId, response.job.jobId, capability);
|
|
192
192
|
return response.job.jobId;
|
|
@@ -9,12 +9,25 @@
|
|
|
9
9
|
"exportSaved": "File saved: {{path}}",
|
|
10
10
|
"exportSavedRevealFailed": "The file was saved to {{path}}, but its folder could not be shown. Open it from this path. Exporting again creates another file.",
|
|
11
11
|
"assetRevealed": "File shown in folder.",
|
|
12
|
+
"downloadRequested": "Download requested. Check your browser's downloads.",
|
|
12
13
|
"assetRevealFailed": "The folder could not be shown for {{path}}. The file has not been changed; try again when the host is available."
|
|
13
14
|
},
|
|
14
15
|
"History": {
|
|
15
16
|
"positionLoading": "Reading this saved result…",
|
|
16
17
|
"positionUnavailable": "This saved result is unavailable. Retry reading it or go back to another page.",
|
|
17
18
|
"title": "History",
|
|
19
|
+
"closePanel": "Close history panel",
|
|
20
|
+
"moreActions": "More history actions",
|
|
21
|
+
"compareRuns": "Compare runs",
|
|
22
|
+
"compareCount": "Select two runs of the same capability ({{count}} of 2 selected).",
|
|
23
|
+
"openComparison": "Show comparison",
|
|
24
|
+
"selectComparisonRun": "Compare {{run}}",
|
|
25
|
+
"comparisonDescription": "Review the recorded inputs, configuration and outputs for these runs.",
|
|
26
|
+
"compareInput": "Input",
|
|
27
|
+
"compareOutput": "Output",
|
|
28
|
+
"compareNoParameters": "No explicit parameters were recorded.",
|
|
29
|
+
"compareUnknown": "Not recorded",
|
|
30
|
+
"openRun": "Open run",
|
|
18
31
|
"panelAriaLabel": "Runtime test History",
|
|
19
32
|
"filterAriaLabel": "Filter history",
|
|
20
33
|
"filtersAriaLabel": "History filters",
|
|
@@ -29,7 +42,7 @@
|
|
|
29
42
|
"filters": {
|
|
30
43
|
"status": {
|
|
31
44
|
"all": "All statuses",
|
|
32
|
-
"ready": "
|
|
45
|
+
"ready": "Completed",
|
|
33
46
|
"failed": "Failed",
|
|
34
47
|
"canceled": "Canceled",
|
|
35
48
|
"timedOut": "Timed out",
|
|
@@ -71,7 +84,8 @@
|
|
|
71
84
|
"hideFailures": "Hide failed",
|
|
72
85
|
"showFailures": "Show failed",
|
|
73
86
|
"unsupportedCapability": "This record's capability cannot be opened here",
|
|
74
|
-
"searchPlaceholder": "Search prompts or results",
|
|
87
|
+
"searchPlaceholder": "Search prompts, models or results",
|
|
88
|
+
"showMoreRuns": "Show more history",
|
|
75
89
|
"deleteRun": "Delete this record",
|
|
76
90
|
"deleteRecordOnly": "Delete record and keep managed asset",
|
|
77
91
|
"deleteRecordAndAsset": "Delete record and managed asset",
|
|
@@ -108,6 +122,7 @@
|
|
|
108
122
|
"recentRuns": "Recent runs",
|
|
109
123
|
"emptyNone": "No runs yet",
|
|
110
124
|
"emptyFiltered": "No runs match these filters",
|
|
125
|
+
"savedRefreshFailedTitle": "Saved. Could not refresh history.",
|
|
111
126
|
"loadFailedTitle": "History failed to load",
|
|
112
127
|
"saveFailedTitle": "History failed to save",
|
|
113
128
|
"deleteRecordAndDocument": "Delete record and its saved result",
|
|
@@ -144,7 +159,7 @@
|
|
|
144
159
|
"mediaOptionUnsupported": "The selected model cannot use one or more media settings in this request.",
|
|
145
160
|
"embeddingPurposeUnsupported": "The selected model does not support the current retrieval purpose setting.",
|
|
146
161
|
"modalityUnsupported": "The selected configuration does not support one or more inputs or options in this request.",
|
|
147
|
-
"providerRateLimited": "The cloud service refused this request because a rate
|
|
162
|
+
"providerRateLimited": "The cloud service refused this request because a rate, usage, or account credit limit was reached.",
|
|
148
163
|
"mediaCodecUnavailable": "The audio and video tools required by this request were unavailable when it ran.",
|
|
149
164
|
"localLoadFailed": "The current on-device configuration could not run this request.",
|
|
150
165
|
"localConfigurationMissing": "This on-device AI capability has no runnable configuration yet. Saving an App selection does not mean its model is ready.",
|
|
@@ -159,7 +174,13 @@
|
|
|
159
174
|
"configInvalid": "This capability's saved AI configuration can't run on the current Runtime, for example because its cloud service is no longer supported.",
|
|
160
175
|
"modelNotFound": "The selected model is not available: its cloud account does not offer it, or no admitted implementation exists for it. Nothing was generated.",
|
|
161
176
|
"fallback": "The generation did not complete.",
|
|
162
|
-
"stoppedDirectCall": "You stopped waiting for this call. A result that arrives later will not be shown."
|
|
177
|
+
"stoppedDirectCall": "You stopped waiting for this call. A result that arrives later will not be shown.",
|
|
178
|
+
"providerAuthFailed": "The cloud service rejected this connection's credentials. Its API key may be expired, revoked, or invalid.",
|
|
179
|
+
"mediaStorageMissing": "This video request needs storage for its uploaded audio or video references.",
|
|
180
|
+
"mediaStorageCredentials": "OSS rejected the reference-media storage credentials.",
|
|
181
|
+
"mediaStorageVersioning": "Reference-media storage requires a bucket with versioning never enabled.",
|
|
182
|
+
"mediaStorageUnavailable": "The reference-media storage request could not complete.",
|
|
183
|
+
"mediaStorageCleanup": "The task could not confirm ownership or deletion of an uploaded reference object."
|
|
163
184
|
},
|
|
164
185
|
"action": {
|
|
165
186
|
"runtimeUnavailable": "Return to Desktop, confirm Local AI is connected, then try again.",
|
|
@@ -174,13 +195,13 @@
|
|
|
174
195
|
"runtimeCallFailed": "Try again once. If it still fails, open Runtime details to find the cause.",
|
|
175
196
|
"contentFilterBlocked": "Try removing or redacting any restricted content, or adjusting the selected context, then submit your request again.",
|
|
176
197
|
"inputLimitExceeded": "Shorten the input, or configure a model that accepts longer input, then run it again.",
|
|
177
|
-
"textBehaviorUnsupported": "Open Parameters and reset the settings this model does not accept, or choose a model that supports this behavior in
|
|
198
|
+
"textBehaviorUnsupported": "Open Parameters and reset the settings this model does not accept, or choose a model that supports this behavior in this App's AI configuration, then run again.",
|
|
178
199
|
"mediaOptionUnsupported": "Open Parameters and reset the unsupported settings, then run again. You can also choose a model that supports those settings in App AI configuration.",
|
|
179
200
|
"embeddingPurposeUnsupported": "Open Parameters and choose \"Content to search\" when indexing documents or \"Search query\" when searching them, then run again. If that purpose is still unsupported, choose a model that supports it in App AI configuration.",
|
|
180
201
|
"modalityUnsupported": "Change the request inputs or reset the unsupported options in Parameters before running again. You can also choose a configuration that supports the request.",
|
|
181
|
-
"providerRateLimited": "
|
|
202
|
+
"providerRateLimited": "Check this provider's rate limits, account balance, plan, and any per-app usage allocation. Retry after the relevant limit is resolved.",
|
|
182
203
|
"mediaCodecUnavailable": "In Nimi Desktop, open AI Capabilities → Advanced & Diagnostics → Audio and video tools. Install or repair it if needed, wait until the components are installed, then run this request again.",
|
|
183
|
-
"localLoadFailed": "Check that the inputs and parameters match the selected model.
|
|
204
|
+
"localLoadFailed": "Check that the inputs and parameters match the selected model. To inspect shared models and components, open AI Capabilities in Nimi Home on the host PC, then run again once the setup is ready. Runtime details show the reported failure.",
|
|
184
205
|
"localConfigurationMissing": "In Nimi Home, open AI Capabilities and finish setting up the local model for this capability. Once it is available, return here and submit your current input again. Runtime details retain the reported failure.",
|
|
185
206
|
"voiceInputRequired": "Open Parameters and choose a supported preset or compatible local voice asset. If this model needs an asset and none is listed, create one under Voice Creation, then return here.",
|
|
186
207
|
"voiceTargetMismatch": "Choose a voice asset compatible with the current speech model, or create one under Voice Creation before retrying.",
|
|
@@ -193,7 +214,13 @@
|
|
|
193
214
|
"configInvalid": "Open App AI configuration, choose a model for this capability again, then run it again.",
|
|
194
215
|
"modelNotFound": "Open App AI configuration, choose an available model for this capability, then run it again.",
|
|
195
216
|
"fallback": "Try again. If it still fails, open Runtime details to find the cause.",
|
|
196
|
-
"stoppedDirectCall": "Run it again whenever you are ready."
|
|
217
|
+
"stoppedDirectCall": "Run it again whenever you are ready.",
|
|
218
|
+
"providerAuthFailed": "Update this connection's API key or sign in again in Nimi Cloud Services, then submit a new request.",
|
|
219
|
+
"mediaStorageMissing": "In Nimi Cloud Services, open this connection and configure Reference media storage. Then submit a new request.",
|
|
220
|
+
"mediaStorageCredentials": "Update the OSS credentials in this connection’s Reference media storage settings and verify its bucket permissions.",
|
|
221
|
+
"mediaStorageVersioning": "Configure an unversioned OSS bucket for this connection’s reference media.",
|
|
222
|
+
"mediaStorageUnavailable": "Check the OSS region, bucket and permissions in Nimi Cloud Services before submitting again.",
|
|
223
|
+
"mediaStorageCleanup": "Inspect this task’s cleanup result in Nimi diagnostics and the configured OSS bucket. Re-running generation does not prove cleanup."
|
|
197
224
|
},
|
|
198
225
|
"hint": {
|
|
199
226
|
"runtimeUnavailable": "Restore the protected Runtime connection, then retry the same request.",
|
|
@@ -221,15 +248,22 @@
|
|
|
221
248
|
"expandGeneratedImage": "Expand generated image",
|
|
222
249
|
"imagePreview": "Image preview",
|
|
223
250
|
"imagePreviewFailed": "The image preview could not be opened. Please try again.",
|
|
251
|
+
"mediaPreviewFailed": "The saved media could not be loaded. Retry loading the existing result.",
|
|
224
252
|
"closeImagePreview": "Close image preview",
|
|
225
253
|
"emptyBody": "(empty body)",
|
|
226
254
|
"emptyTranscript": "(empty transcript)",
|
|
227
255
|
"contextLabel": "Context",
|
|
228
|
-
"requestSettings": "
|
|
256
|
+
"requestSettings": "Run configuration and parameters",
|
|
257
|
+
"modelNotRecorded": "Model target not recorded",
|
|
258
|
+
"parametersNotRecorded": "This record does not contain request parameters.",
|
|
259
|
+
"configuredDefaults": "App defaults at submission",
|
|
260
|
+
"recordedConfigScope": "These are submission settings. The actual execution model and server-resolved defaults are not recorded here.",
|
|
229
261
|
"showRequestSettings": "Show request settings",
|
|
230
262
|
"hideRequestSettings": "Hide request settings",
|
|
231
263
|
"legacyRecordHint": "This older persisted run record contains only status metadata. Run it again to persist the typed result snapshot.",
|
|
232
264
|
"historyInputTruncated": "History keeps only the beginning of this long input, so this record cannot be reused as a draft or run again.",
|
|
265
|
+
"recordedInput": "Input for this run",
|
|
266
|
+
"editNextRun": "Edit the next run",
|
|
233
267
|
"historyAdditionalDocumentsNotRetained": "Only the first document can be reused as a draft. Add the other documents again before running.",
|
|
234
268
|
"generationFailed": "Generation could not be completed",
|
|
235
269
|
"generationCanceled": "Generation canceled",
|
|
@@ -242,10 +276,10 @@
|
|
|
242
276
|
"downloadGeneration": "Download generation",
|
|
243
277
|
"revealAsset": "Show in folder",
|
|
244
278
|
"revealGeneration": "Show generated file in folder",
|
|
245
|
-
"regenerate": "
|
|
246
|
-
"newRun": "
|
|
247
|
-
"useAsDraft": "
|
|
248
|
-
"intentLabel": "
|
|
279
|
+
"regenerate": "Run again with current configuration",
|
|
280
|
+
"newRun": "Back to draft",
|
|
281
|
+
"useAsDraft": "Reuse input",
|
|
282
|
+
"intentLabel": "Configuration for this run",
|
|
249
283
|
"embeddingSuccess": "Embedding generated successfully.",
|
|
250
284
|
"voiceAssetSuccess": "This run created a voice.",
|
|
251
285
|
"voiceExpiry": "Provider expiry: {{date}}. Active use may extend this time.",
|
|
@@ -260,7 +294,7 @@
|
|
|
260
294
|
"promptLabel": "Prompt",
|
|
261
295
|
"requestLabel": "Request",
|
|
262
296
|
"generationLabel": "Generation",
|
|
263
|
-
"runStatusReady": "
|
|
297
|
+
"runStatusReady": "Completed",
|
|
264
298
|
"runStatusUnavailable": "sdk unavailable",
|
|
265
299
|
"runStatusFailed": "failed",
|
|
266
300
|
"runStatusCanceled": "canceled",
|
|
@@ -287,14 +321,21 @@
|
|
|
287
321
|
"runtimeOwnedIntent": "Runtime-owned capability intent",
|
|
288
322
|
"openIntentConfig": "Open AI intent configuration",
|
|
289
323
|
"configureIntent": "Configure capability intent",
|
|
324
|
+
"inputRequired": "Add the input required for this experiment.",
|
|
290
325
|
"context": "Context",
|
|
291
326
|
"contextAttached": "Context attached",
|
|
292
|
-
"attachContext": "Attach
|
|
327
|
+
"attachContext": "Attach file",
|
|
328
|
+
"inputTitle": "Experiment input",
|
|
329
|
+
"sourceUrl": "Source URL",
|
|
330
|
+
"runShortcut": "Ctrl / ⌘ + Enter",
|
|
293
331
|
"removeAttachment": "Remove {{name}}",
|
|
294
332
|
"requestAriaLabel": "{{capability}} request",
|
|
295
333
|
"startAriaLabel": "{{capability}} start",
|
|
296
334
|
"contextPlaceholder": "Optional context, audience, source notes, or constraints",
|
|
297
|
-
"intentSummary": "
|
|
335
|
+
"intentSummary": "Next run · {{intent}}",
|
|
336
|
+
"routeLocal": "Local",
|
|
337
|
+
"routeCloud": "Cloud",
|
|
338
|
+
"routeUnknown": "Route unknown"
|
|
298
339
|
},
|
|
299
340
|
"parameters": {
|
|
300
341
|
"title": "Parameters",
|
|
@@ -313,7 +354,12 @@
|
|
|
313
354
|
}
|
|
314
355
|
},
|
|
315
356
|
"run": {
|
|
316
|
-
"aiConfigLoadFailed": "App
|
|
357
|
+
"aiConfigLoadFailed": "Could not read the App's AI configuration.",
|
|
358
|
+
"runtimeConnected": "Runtime connected",
|
|
359
|
+
"runtimeChecking": "Checking Runtime",
|
|
360
|
+
"runtimeUnavailable": "Runtime unavailable",
|
|
361
|
+
"effectiveTargetUnavailable": "The configured target is unavailable. Check the selected model or Loadout.",
|
|
362
|
+
"retryPreparation": "Check again"
|
|
317
363
|
},
|
|
318
364
|
"drawerError": {
|
|
319
365
|
"title": "Model Config unavailable",
|
|
@@ -324,6 +370,7 @@
|
|
|
324
370
|
"admissionLabel": "Admission",
|
|
325
371
|
"reasonLabel": "Reason",
|
|
326
372
|
"traceLabel": "Trace",
|
|
373
|
+
"jobLabel": "Runtime job",
|
|
327
374
|
"verboseConsoleNote": "Verbose console: capability {{capability}}; {{state}}.",
|
|
328
375
|
"verboseTypedSuccess": "typed success",
|
|
329
376
|
"verboseFailClosed": "fail-closed {{reason}}",
|
|
@@ -360,6 +407,7 @@
|
|
|
360
407
|
"statState": "State",
|
|
361
408
|
"stateUnknown": "unknown",
|
|
362
409
|
"statVoices": "Voices",
|
|
410
|
+
"metricCharacters": "{{count}} characters",
|
|
363
411
|
"metricWords_one": "{{count}} word",
|
|
364
412
|
"metricWords_other": "{{count}} words",
|
|
365
413
|
"metricArtifacts_one": "{{count}} artifact",
|
|
@@ -434,7 +482,8 @@
|
|
|
434
482
|
"toolResult": "Tool result {{name}} · {{id}}",
|
|
435
483
|
"toolError": "Tool error {{name}} · {{id}}",
|
|
436
484
|
"structured": "Parsed structured result",
|
|
437
|
-
"finalText": "Final text"
|
|
485
|
+
"finalText": "Final text",
|
|
486
|
+
"jsonObjectScenario": "JSON object test: the App parsed the final text and verified it is an object."
|
|
438
487
|
},
|
|
439
488
|
"decision": {
|
|
440
489
|
"title": "Decisions",
|
|
@@ -460,7 +509,12 @@
|
|
|
460
509
|
"nothingObserved": "No results were observed.",
|
|
461
510
|
"notRestorable": "A closed Session cannot be restored. Open a new Session to run it again.",
|
|
462
511
|
"stateClosed": "Closed",
|
|
463
|
-
"stateTerminated": "Terminated"
|
|
512
|
+
"stateTerminated": "Terminated",
|
|
513
|
+
"audioUsageFinal": "Final reported cumulative audio: {{seconds}} s. This is not a token count or price estimate.",
|
|
514
|
+
"audioUsagePartial": "Audio reported so far: {{seconds}} s. The provider has not marked this total as final.",
|
|
515
|
+
"localClosureUnconfirmed": "The session ended; local resource release is unconfirmed.",
|
|
516
|
+
"providerClosureConfirmed": "Local resources released and provider session closure confirmed.",
|
|
517
|
+
"localClosureConfirmed": "Local connection and resources released. The provider has not confirmed that its session closed."
|
|
464
518
|
},
|
|
465
519
|
"faceSwap": {
|
|
466
520
|
"inputs": "Face replacement inputs",
|
|
@@ -9,12 +9,25 @@
|
|
|
9
9
|
"exportSaved": "文件已保存:{{path}}",
|
|
10
10
|
"exportSavedRevealFailed": "文件已保存到 {{path}},但无法显示所在文件夹。请从此路径打开;再次导出会创建另一份文件。",
|
|
11
11
|
"assetRevealed": "已在文件夹中显示文件。",
|
|
12
|
+
"downloadRequested": "已发起下载,请查看浏览器下载列表。",
|
|
12
13
|
"assetRevealFailed": "无法显示 {{path}} 所在的文件夹。文件未被修改,请在宿主可用后重试。"
|
|
13
14
|
},
|
|
14
15
|
"History": {
|
|
15
16
|
"positionLoading": "正在读取这条已保存的结果…",
|
|
16
17
|
"positionUnavailable": "这条已保存的结果不可用。可以重试读取,或后退到其他页面。",
|
|
17
18
|
"title": "历史",
|
|
19
|
+
"closePanel": "关闭历史面板",
|
|
20
|
+
"moreActions": "更多历史操作",
|
|
21
|
+
"compareRuns": "比较运行",
|
|
22
|
+
"compareCount": "选择同一能力的两次运行(已选 {{count}} 项,共 2 项)。",
|
|
23
|
+
"openComparison": "查看比较",
|
|
24
|
+
"selectComparisonRun": "选择用于比较的运行 {{run}}",
|
|
25
|
+
"comparisonDescription": "对照两次运行已记录的输入、配置与结果。",
|
|
26
|
+
"compareInput": "输入",
|
|
27
|
+
"compareOutput": "结果",
|
|
28
|
+
"compareNoParameters": "未记录显式参数。",
|
|
29
|
+
"compareUnknown": "未记录",
|
|
30
|
+
"openRun": "打开运行",
|
|
18
31
|
"panelAriaLabel": "Runtime 测试历史",
|
|
19
32
|
"filterAriaLabel": "筛选历史",
|
|
20
33
|
"filtersAriaLabel": "历史筛选",
|
|
@@ -29,7 +42,7 @@
|
|
|
29
42
|
"filters": {
|
|
30
43
|
"status": {
|
|
31
44
|
"all": "全部状态",
|
|
32
|
-
"ready": "
|
|
45
|
+
"ready": "已完成",
|
|
33
46
|
"failed": "失败",
|
|
34
47
|
"canceled": "已取消",
|
|
35
48
|
"timedOut": "已超时",
|
|
@@ -71,7 +84,8 @@
|
|
|
71
84
|
"hideFailures": "隐藏失败",
|
|
72
85
|
"showFailures": "显示失败",
|
|
73
86
|
"unsupportedCapability": "这条记录的能力无法在此打开",
|
|
74
|
-
"searchPlaceholder": "
|
|
87
|
+
"searchPlaceholder": "搜索提示词、模型或结果",
|
|
88
|
+
"showMoreRuns": "显示更多历史",
|
|
75
89
|
"deleteRun": "删除这条记录",
|
|
76
90
|
"deleteRecordOnly": "删除记录并保留托管资产",
|
|
77
91
|
"deleteRecordAndAsset": "删除记录和托管资产",
|
|
@@ -108,6 +122,7 @@
|
|
|
108
122
|
"recentRuns": "最近运行",
|
|
109
123
|
"emptyNone": "还没有运行记录",
|
|
110
124
|
"emptyFiltered": "没有符合这些筛选条件的运行",
|
|
125
|
+
"savedRefreshFailedTitle": "已保存,历史记录刷新失败",
|
|
111
126
|
"loadFailedTitle": "历史加载失败",
|
|
112
127
|
"saveFailedTitle": "历史保存失败",
|
|
113
128
|
"deleteRecordAndDocument": "删除记录及其保存的结果",
|
|
@@ -144,7 +159,7 @@
|
|
|
144
159
|
"mediaOptionUnsupported": "当前模型不支持这次请求中的一项或多项媒体参数。",
|
|
145
160
|
"embeddingPurposeUnsupported": "所选模型不支持当前的检索用途设置。",
|
|
146
161
|
"modalityUnsupported": "当前配置不支持这次请求中的一项或多项输入或参数。",
|
|
147
|
-
"providerRateLimited": "
|
|
162
|
+
"providerRateLimited": "云服务因速率、用量或账户余额限制拒绝了本次请求。",
|
|
148
163
|
"mediaCodecUnavailable": "运行此请求时,所需的 Nimi 音视频工具不可用。",
|
|
149
164
|
"localLoadFailed": "当前本机配置无法按这次请求运行。",
|
|
150
165
|
"localConfigurationMissing": "这项本机 AI 能力还没有可运行的配置。保存 App 的选择并不表示模型已经准备好。",
|
|
@@ -159,7 +174,13 @@
|
|
|
159
174
|
"configInvalid": "此能力保存的 AI 配置无法在当前 Runtime 中运行,例如所用的云服务已不再支持。",
|
|
160
175
|
"modelNotFound": "所选模型不可用:其云端账户未提供该模型,或没有可用的已准入实现。本次没有生成内容。",
|
|
161
176
|
"fallback": "本次生成未完成。",
|
|
162
|
-
"stoppedDirectCall": "已停止等待这次调用,之后返回的结果不会显示。"
|
|
177
|
+
"stoppedDirectCall": "已停止等待这次调用,之后返回的结果不会显示。",
|
|
178
|
+
"providerAuthFailed": "云服务拒绝了当前连接的凭据。API 密钥可能已过期、被撤销或无效。",
|
|
179
|
+
"mediaStorageMissing": "这次视频请求需要配置存储,用于上传参考音频或视频。",
|
|
180
|
+
"mediaStorageCredentials": "OSS 拒绝了参考素材存储的凭据。",
|
|
181
|
+
"mediaStorageVersioning": "参考素材存储需要使用从未启用版本控制的 Bucket。",
|
|
182
|
+
"mediaStorageUnavailable": "参考素材存储请求未能完成。",
|
|
183
|
+
"mediaStorageCleanup": "本任务未能确认已上传参考对象的归属或删除结果。"
|
|
163
184
|
},
|
|
164
185
|
"action": {
|
|
165
186
|
"runtimeUnavailable": "返回 Desktop 确认本地 AI 已连接,然后重试。",
|
|
@@ -174,13 +195,13 @@
|
|
|
174
195
|
"runtimeCallFailed": "先重试一次;如果仍然失败,再展开 Runtime 详情查看原因。",
|
|
175
196
|
"contentFilterBlocked": "请尝试移除或脱敏受限内容,或调整所选上下文后重新提交。",
|
|
176
197
|
"inputLimitExceeded": "请缩短输入,或配置可接受更长输入的模型,然后重新运行。",
|
|
177
|
-
"textBehaviorUnsupported": "
|
|
198
|
+
"textBehaviorUnsupported": "打开「参数」并重置此模型不支持的设置,或在本 App 的 AI 配置中改选支持该行为的模型,再重新运行。",
|
|
178
199
|
"mediaOptionUnsupported": "打开「参数」重置不受支持的设置后重新运行,也可以在 App AI 配置中选择支持这些设置的模型。",
|
|
179
200
|
"embeddingPurposeUnsupported": "打开「参数」,按任务选择「待检索内容」(建立索引)或「检索问题」(搜索),再重新运行。如果仍不支持该用途,可在 App AI 配置中选择支持它的模型。",
|
|
180
201
|
"modalityUnsupported": "请先修改输入,或在「参数」中重置不受支持的设置后再运行,也可以选择支持这次请求的配置。",
|
|
181
|
-
"providerRateLimited": "
|
|
202
|
+
"providerRateLimited": "请检查当前服务商的速率限制、账户余额、套餐和分配给本 App 的用量额度。解除相应限制后再重新运行。",
|
|
182
203
|
"mediaCodecUnavailable": "在 Nimi Desktop 打开「AI 能力」→「高级与诊断」→「音频与视频组件」;如组件未就绪,选择「安装或修复」,等显示已安装后再运行此请求。",
|
|
183
|
-
"localLoadFailed": "
|
|
204
|
+
"localLoadFailed": "请确认输入和参数与所选模型匹配;如需检查公共模型和组件,请在主机 Nimi Home 的「AI 能力」中处理,完成后再运行。Runtime 详情保留了本次失败信息。",
|
|
184
205
|
"localConfigurationMissing": "请在 Nimi Home 的「AI 能力」中完成这项能力的本机模型配置,确认已可用后,返回这里重新提交当前输入。Runtime 详情保留了本次失败信息。",
|
|
185
206
|
"voiceInputRequired": "打开「参数」选择当前模型支持的预设语音或兼容的本地语音资产;如该模型需要资产而列表为空,先到「创建语音」创建,再返回重试。",
|
|
186
207
|
"voiceTargetMismatch": "选择与当前语音模型兼容的资产,或先在「创建语音」中创建一个,再重试。",
|
|
@@ -193,7 +214,13 @@
|
|
|
193
214
|
"configInvalid": "打开 App AI 配置,为此能力重新选择模型,然后重新运行。",
|
|
194
215
|
"modelNotFound": "打开 App AI 配置,为此能力选择一个可用的模型,然后重新运行。",
|
|
195
216
|
"fallback": "请重试;如果仍然失败,再展开 Runtime 详情查看原因。",
|
|
196
|
-
"stoppedDirectCall": "准备好后可以直接重新运行。"
|
|
217
|
+
"stoppedDirectCall": "准备好后可以直接重新运行。",
|
|
218
|
+
"providerAuthFailed": "先在 Nimi 的「云服务」中更新此连接的密钥或重新登录,再提交新请求。",
|
|
219
|
+
"mediaStorageMissing": "在 Nimi「云服务」中打开当前连接,配置「参考音视频存储」,再提交新请求。",
|
|
220
|
+
"mediaStorageCredentials": "在当前连接的「参考音视频存储」中更新 OSS 凭据,并检查 Bucket 权限。",
|
|
221
|
+
"mediaStorageVersioning": "为当前连接配置从未启用版本控制的 OSS Bucket。",
|
|
222
|
+
"mediaStorageUnavailable": "先在 Nimi「云服务」检查 OSS 地域、Bucket 和权限,再提交新请求。",
|
|
223
|
+
"mediaStorageCleanup": "查看 Nimi 诊断中的本任务清理结果及所配置的 OSS Bucket。重新生成不能证明旧素材已被删除。"
|
|
197
224
|
},
|
|
198
225
|
"hint": {
|
|
199
226
|
"runtimeUnavailable": "恢复受保护的 Runtime 连接后重试同一请求。",
|
|
@@ -221,15 +248,22 @@
|
|
|
221
248
|
"expandGeneratedImage": "展开生成的图片",
|
|
222
249
|
"imagePreview": "图片预览",
|
|
223
250
|
"imagePreviewFailed": "无法打开图片预览,请重试。",
|
|
251
|
+
"mediaPreviewFailed": "未能加载已保存的媒体,请重试读取原结果。",
|
|
224
252
|
"closeImagePreview": "关闭图片预览",
|
|
225
253
|
"emptyBody": "(空内容)",
|
|
226
254
|
"emptyTranscript": "(空转写)",
|
|
227
255
|
"contextLabel": "上下文",
|
|
228
|
-
"requestSettings": "
|
|
256
|
+
"requestSettings": "运行配置与参数",
|
|
257
|
+
"modelNotRecorded": "模型目标未记录",
|
|
258
|
+
"parametersNotRecorded": "这条记录没有保存请求参数。",
|
|
259
|
+
"configuredDefaults": "提交时的应用默认值",
|
|
260
|
+
"recordedConfigScope": "这里显示提交时的设置。实际执行模型和服务端补齐的默认值未记录。",
|
|
229
261
|
"showRequestSettings": "显示请求设置",
|
|
230
262
|
"hideRequestSettings": "隐藏请求设置",
|
|
231
263
|
"legacyRecordHint": "这条较早的历史记录仅包含状态元数据。重新运行一次即可保存类型化的结果快照。",
|
|
232
264
|
"historyInputTruncated": "历史只保留这段长输入的开头部分,因此这条记录不能用作草稿或重新运行。",
|
|
265
|
+
"recordedInput": "当次输入",
|
|
266
|
+
"editNextRun": "编辑下一次运行",
|
|
233
267
|
"historyAdditionalDocumentsNotRetained": "只能将第一篇文档用作草稿。重新运行前请再次添加其他文档。",
|
|
234
268
|
"generationFailed": "生成未能完成",
|
|
235
269
|
"generationCanceled": "生成已取消",
|
|
@@ -242,10 +276,10 @@
|
|
|
242
276
|
"downloadGeneration": "下载生成结果",
|
|
243
277
|
"revealAsset": "在文件夹中显示",
|
|
244
278
|
"revealGeneration": "在文件夹中显示生成文件",
|
|
245
|
-
"regenerate": "
|
|
246
|
-
"newRun": "
|
|
247
|
-
"useAsDraft": "
|
|
248
|
-
"intentLabel": "
|
|
279
|
+
"regenerate": "按当前配置再次运行",
|
|
280
|
+
"newRun": "返回草稿",
|
|
281
|
+
"useAsDraft": "复用输入",
|
|
282
|
+
"intentLabel": "当次配置",
|
|
249
283
|
"embeddingSuccess": "向量嵌入生成成功。",
|
|
250
284
|
"voiceAssetSuccess": "这次运行创建了一个音色。",
|
|
251
285
|
"voiceExpiry": "提供方有效期:{{date}}。实际使用可能延长有效期。",
|
|
@@ -260,7 +294,7 @@
|
|
|
260
294
|
"promptLabel": "提示词",
|
|
261
295
|
"requestLabel": "请求",
|
|
262
296
|
"generationLabel": "生成结果",
|
|
263
|
-
"runStatusReady": "
|
|
297
|
+
"runStatusReady": "已完成",
|
|
264
298
|
"runStatusUnavailable": "SDK 不可用",
|
|
265
299
|
"runStatusFailed": "失败",
|
|
266
300
|
"runStatusCanceled": "已取消",
|
|
@@ -287,14 +321,21 @@
|
|
|
287
321
|
"runtimeOwnedIntent": "由 Runtime 拥有的能力意图",
|
|
288
322
|
"openIntentConfig": "打开 AI 意图配置",
|
|
289
323
|
"configureIntent": "配置能力意图",
|
|
324
|
+
"inputRequired": "请添加本次实验所需的输入。",
|
|
290
325
|
"context": "上下文",
|
|
291
326
|
"contextAttached": "已附加上下文",
|
|
292
|
-
"attachContext": "
|
|
327
|
+
"attachContext": "添加附件",
|
|
328
|
+
"inputTitle": "实验输入",
|
|
329
|
+
"sourceUrl": "来源链接",
|
|
330
|
+
"runShortcut": "Ctrl / ⌘ + Enter",
|
|
293
331
|
"removeAttachment": "移除 {{name}}",
|
|
294
332
|
"requestAriaLabel": "{{capability}}请求",
|
|
295
333
|
"startAriaLabel": "{{capability}}起始页",
|
|
296
334
|
"contextPlaceholder": "可选的上下文、受众、来源笔记或约束",
|
|
297
|
-
"intentSummary": "
|
|
335
|
+
"intentSummary": "下次运行 · {{intent}}",
|
|
336
|
+
"routeLocal": "本地",
|
|
337
|
+
"routeCloud": "云端",
|
|
338
|
+
"routeUnknown": "路由未知"
|
|
298
339
|
},
|
|
299
340
|
"parameters": {
|
|
300
341
|
"title": "参数",
|
|
@@ -313,7 +354,12 @@
|
|
|
313
354
|
}
|
|
314
355
|
},
|
|
315
356
|
"run": {
|
|
316
|
-
"aiConfigLoadFailed": "
|
|
357
|
+
"aiConfigLoadFailed": "无法读取此应用的 AI 配置。",
|
|
358
|
+
"runtimeConnected": "Runtime 已连接",
|
|
359
|
+
"runtimeChecking": "正在检查 Runtime",
|
|
360
|
+
"runtimeUnavailable": "Runtime 不可用",
|
|
361
|
+
"effectiveTargetUnavailable": "已配置的目标不可用。请检查所选模型或 Loadout。",
|
|
362
|
+
"retryPreparation": "重新检查"
|
|
317
363
|
},
|
|
318
364
|
"drawerError": {
|
|
319
365
|
"title": "模型配置不可用",
|
|
@@ -324,6 +370,7 @@
|
|
|
324
370
|
"admissionLabel": "准入",
|
|
325
371
|
"reasonLabel": "原因",
|
|
326
372
|
"traceLabel": "追踪",
|
|
373
|
+
"jobLabel": "Runtime 任务",
|
|
327
374
|
"verboseConsoleNote": "详细控制台:能力 {{capability}};{{state}}。",
|
|
328
375
|
"verboseTypedSuccess": "类型化成功",
|
|
329
376
|
"verboseFailClosed": "失败关闭:{{reason}}",
|
|
@@ -360,6 +407,7 @@
|
|
|
360
407
|
"statState": "状态",
|
|
361
408
|
"stateUnknown": "未知",
|
|
362
409
|
"statVoices": "语音",
|
|
410
|
+
"metricCharacters": "{{count}} 字符",
|
|
363
411
|
"metricWords_one": "{{count}} 个词",
|
|
364
412
|
"metricWords_other": "{{count}} 个词",
|
|
365
413
|
"metricArtifacts_one": "{{count}} 个产物",
|
|
@@ -434,7 +482,8 @@
|
|
|
434
482
|
"toolResult": "工具结果 {{name}} · {{id}}",
|
|
435
483
|
"toolError": "工具错误 {{name}} · {{id}}",
|
|
436
484
|
"structured": "解析后的结构化结果",
|
|
437
|
-
"finalText": "最终文本"
|
|
485
|
+
"finalText": "最终文本",
|
|
486
|
+
"jsonObjectScenario": "JSON 对象测试:App 已解析最终文本并确认其为对象。"
|
|
438
487
|
},
|
|
439
488
|
"decision": {
|
|
440
489
|
"title": "判断结果",
|
|
@@ -460,7 +509,12 @@
|
|
|
460
509
|
"nothingObserved": "未观察到任何结果。",
|
|
461
510
|
"notRestorable": "已关闭的会话无法恢复。如需再次测试,请打开新会话。",
|
|
462
511
|
"stateClosed": "已关闭",
|
|
463
|
-
"stateTerminated": "已终止"
|
|
512
|
+
"stateTerminated": "已终止",
|
|
513
|
+
"audioUsageFinal": "供方最终报告的累计音频:{{seconds}} 秒。此值不是 token 数或费用估算。",
|
|
514
|
+
"audioUsagePartial": "服务商目前报告的累计音频:{{seconds}} 秒。该用量尚未标为最终值。",
|
|
515
|
+
"localClosureUnconfirmed": "会话已结束,本地资源释放尚未确认。",
|
|
516
|
+
"providerClosureConfirmed": "本地资源已释放,并已收到供方会话关闭回执。",
|
|
517
|
+
"localClosureConfirmed": "本地连接与资源已释放。服务商尚未确认会话已关闭。"
|
|
464
518
|
},
|
|
465
519
|
"faceSwap": {
|
|
466
520
|
"inputs": "换脸输入",
|
|
@@ -27,6 +27,7 @@ export type CapabilityStudioProfile = {
|
|
|
27
27
|
readonly footnoteKey: string;
|
|
28
28
|
readonly statusLabelKey?: string;
|
|
29
29
|
readonly pendingLabelKey?: string;
|
|
30
|
+
readonly primaryParameters?: 'all' | 'partial';
|
|
30
31
|
// The capability runs only when its parameter panel supplies the input
|
|
31
32
|
// (for example selected media) rather than the composer prompt.
|
|
32
33
|
readonly requiresParameterInput?: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { NIMI_CHATGPT_PLAN_USAGE_URL } from '@nimiplatform/sdk/runtime';
|
|
2
1
|
import type {
|
|
3
2
|
StudioNonSuccess,
|
|
4
3
|
StudioNonSuccessDiagnostics,
|
|
@@ -36,6 +35,16 @@ export function isStoppedDirectCall(reason: string, capabilityId?: string): bool
|
|
|
36
35
|
return reason === 'operation-aborted' && capabilityId !== undefined && DIRECT_CALL_CAPABILITIES.has(capabilityId);
|
|
37
36
|
}
|
|
38
37
|
|
|
38
|
+
export function studioTerminalStatusKey(reason?: StudioNonSuccessReason, capabilityId?: string): string {
|
|
39
|
+
if (!reason) return 'Studio.result.status.runtimeResult';
|
|
40
|
+
if (reason === 'runtime-canceled') return 'Studio.result.status.runtimeCanceled';
|
|
41
|
+
if (reason === 'runtime-timeout') return 'Studio.result.status.runtimeTimedOut';
|
|
42
|
+
if (reason === 'operation-aborted') return isStoppedDirectCall(reason, capabilityId)
|
|
43
|
+
? 'Studio.result.status.stoppedDirectCall'
|
|
44
|
+
: 'Studio.result.status.operationAborted';
|
|
45
|
+
return 'Studio.result.status.runtimeBlocked';
|
|
46
|
+
}
|
|
47
|
+
|
|
39
48
|
export function studioNonSuccessReasonTitle(reason: StudioNonSuccessReason, translate: StudioTranslate, capabilityId?: string): string {
|
|
40
49
|
if (isStoppedDirectCall(reason, capabilityId)) return translate('NonSuccess.title.stoppedDirectCall');
|
|
41
50
|
return translate(`NonSuccess.title.${reasonKeySegment(reason)}`);
|
|
@@ -54,14 +63,15 @@ const CONTENT_FILTER_BLOCKED_REASON_CODE = 'AI_CONTENT_FILTER_BLOCKED';
|
|
|
54
63
|
const VOICE_INPUT_INVALID_REASON_CODE = 'AI_VOICE_INPUT_INVALID';
|
|
55
64
|
const VOICE_TARGET_MISMATCH_REASON_CODE = 'AI_VOICE_TARGET_MODEL_MISMATCH';
|
|
56
65
|
const UNAVAILABLE_VOICE_REASON_CODES: ReadonlySet<string> = new Set(['AI_VOICE_ASSET_NOT_FOUND', 'AI_VOICE_ASSET_EXPIRED']);
|
|
57
|
-
//
|
|
58
|
-
//
|
|
66
|
+
// This reason covers rate, usage and credit limits. It does not identify a
|
|
67
|
+
// provider or account, so recovery guidance must stay with the selected service.
|
|
59
68
|
const PROVIDER_RATE_LIMITED_REASON_CODE = 'AI_PROVIDER_RATE_LIMITED';
|
|
60
69
|
|
|
61
70
|
// A committed target that Runtime can no longer run is recovered by choosing a
|
|
62
71
|
// target again (or repairing its Connector in Desktop), never by retrying the
|
|
63
72
|
// same request.
|
|
64
73
|
const TARGET_RESELECTION_KEY_SEGMENTS: ReadonlyMap<string, string> = new Map([
|
|
74
|
+
['AI_PROVIDER_AUTH_FAILED', 'providerAuthFailed'],
|
|
65
75
|
['AI_REMOTE_MODEL_CATALOG_STALE', 'catalogStale'],
|
|
66
76
|
['CAPABILITY_CATALOG_MISMATCH', 'catalogMismatch'],
|
|
67
77
|
['AI_CONNECTOR_DISABLED', 'connectorDisabled'],
|
|
@@ -79,9 +89,22 @@ export function studioNonSuccessNeedsTargetReselection(diagnostics?: StudioNonSu
|
|
|
79
89
|
return targetReselectionKeySegment(diagnostics) !== '';
|
|
80
90
|
}
|
|
81
91
|
|
|
92
|
+
function mediaStorageKeySegment(diagnostics?: StudioNonSuccessDiagnostics): string {
|
|
93
|
+
switch (diagnostics?.reasonCode) {
|
|
94
|
+
case 'AI_MEDIA_STORAGE_NOT_CONFIGURED': return 'mediaStorageMissing';
|
|
95
|
+
case 'AI_MEDIA_STORAGE_AUTH_FAILED': return 'mediaStorageCredentials';
|
|
96
|
+
case 'AI_MEDIA_STORAGE_UNAVAILABLE': return 'mediaStorageUnavailable';
|
|
97
|
+
case 'AI_MEDIA_STORAGE_OPTION_UNSUPPORTED': return 'mediaStorageVersioning';
|
|
98
|
+
case 'AI_MEDIA_STORAGE_CLEANUP_UNCONFIRMED': return 'mediaStorageCleanup';
|
|
99
|
+
default: return '';
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
82
103
|
export function studioNonSuccessReasonUserMessage(reason: string, translate: StudioTranslate, capabilityId?: string, diagnostics?: StudioNonSuccessDiagnostics, appInputMessage?: string): string {
|
|
104
|
+
const storage = capabilityId === 'video.generate' ? mediaStorageKeySegment(diagnostics) : '';
|
|
105
|
+
if (storage) return translate(`NonSuccess.message.${storage}`);
|
|
83
106
|
if (capabilityId === 'audio.synthesize' && diagnostics && UNAVAILABLE_VOICE_REASON_CODES.has(diagnostics.reasonCode)) return translate('NonSuccess.message.voiceUnavailable');
|
|
84
|
-
if (reason === 'input-invalid' && capabilityId === 'video.generate' && !diagnostics && appInputMessage) return appInputMessage;
|
|
107
|
+
if (reason === 'input-invalid' && (capabilityId === 'video.generate' || capabilityId === 'music.generate') && !diagnostics && appInputMessage) return appInputMessage;
|
|
85
108
|
if (reason === 'input-invalid' && capabilityId === 'audio.transcribe') return translate('NonSuccess.message.transcriptionInputInvalid');
|
|
86
109
|
if (capabilityId === 'audio.synthesize' && diagnostics?.reasonCode === VOICE_INPUT_INVALID_REASON_CODE) return translate('NonSuccess.message.voiceInputRequired');
|
|
87
110
|
if (capabilityId === 'audio.synthesize' && diagnostics?.reasonCode === VOICE_TARGET_MISMATCH_REASON_CODE) return translate('NonSuccess.message.voiceTargetMismatch');
|
|
@@ -108,6 +131,8 @@ export function studioNonSuccessReasonUserMessage(reason: string, translate: Stu
|
|
|
108
131
|
}
|
|
109
132
|
|
|
110
133
|
export function studioNonSuccessReasonUserAction(reason: string, translate: StudioTranslate, capabilityId?: string, diagnostics?: StudioNonSuccessDiagnostics): string {
|
|
134
|
+
const storage = capabilityId === 'video.generate' ? mediaStorageKeySegment(diagnostics) : '';
|
|
135
|
+
if (storage) return translate(`NonSuccess.action.${storage}`);
|
|
111
136
|
if (capabilityId === 'audio.synthesize' && diagnostics && UNAVAILABLE_VOICE_REASON_CODES.has(diagnostics.reasonCode)) return translate('NonSuccess.action.voiceUnavailable');
|
|
112
137
|
if (reason === 'input-invalid' && capabilityId === 'audio.transcribe') return translate('NonSuccess.action.transcriptionInputInvalid');
|
|
113
138
|
if (capabilityId === 'audio.synthesize' && diagnostics?.reasonCode === VOICE_INPUT_INVALID_REASON_CODE) return translate('NonSuccess.action.voiceInputRequired');
|
|
@@ -124,7 +149,7 @@ export function studioNonSuccessReasonUserAction(reason: string, translate: Stud
|
|
|
124
149
|
if (capabilityId === 'text.embed' && diagnostics?.reasonCode === MEDIA_OPTION_UNSUPPORTED_REASON_CODE) return translate('NonSuccess.action.embeddingPurposeUnsupported');
|
|
125
150
|
if (diagnostics?.reasonCode === MEDIA_OPTION_UNSUPPORTED_REASON_CODE) return translate('NonSuccess.action.mediaOptionUnsupported');
|
|
126
151
|
if (diagnostics?.reasonCode === MODALITY_UNSUPPORTED_REASON_CODE) return translate('NonSuccess.action.modalityUnsupported');
|
|
127
|
-
if (diagnostics?.reasonCode === PROVIDER_RATE_LIMITED_REASON_CODE) return translate('NonSuccess.action.providerRateLimited'
|
|
152
|
+
if (diagnostics?.reasonCode === PROVIDER_RATE_LIMITED_REASON_CODE) return translate('NonSuccess.action.providerRateLimited');
|
|
128
153
|
const reselection = targetReselectionKeySegment(diagnostics);
|
|
129
154
|
if (reselection) return translate(`NonSuccess.action.${reselection}`);
|
|
130
155
|
if (reason === 'input-invalid' && capabilityId === 'vision.locate') return translate('VisionLocate.correctInput');
|
|
@@ -20,6 +20,7 @@ export type StudioParameterPanelProps = {
|
|
|
20
20
|
readonly parameters: StudioParameterValue;
|
|
21
21
|
readonly disabled: boolean;
|
|
22
22
|
readonly onChange: (parameters: StudioParameterValue) => void;
|
|
23
|
+
readonly onInputPreparationStart?: () => () => void;
|
|
23
24
|
};
|
|
24
25
|
|
|
25
26
|
export type StudioParameterFieldDefinition = {
|
|
@@ -32,22 +33,27 @@ export function StudioParameterPanelFrame({
|
|
|
32
33
|
translate,
|
|
33
34
|
disabled,
|
|
34
35
|
onReset,
|
|
36
|
+
primary,
|
|
35
37
|
children,
|
|
36
38
|
}: {
|
|
37
39
|
readonly translate: StudioParameterTranslate;
|
|
38
40
|
readonly disabled: boolean;
|
|
39
41
|
readonly onReset: () => void;
|
|
42
|
+
readonly primary?: ReactNode;
|
|
40
43
|
readonly children: ReactNode;
|
|
41
44
|
}) {
|
|
42
45
|
return (
|
|
43
46
|
<section className="studio-parameters" aria-label={translate('Studio.parameters.title')}>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<
|
|
47
|
-
{translate('Studio.parameters.
|
|
48
|
-
|
|
47
|
+
{primary}
|
|
48
|
+
<div className="studio-parameters__advanced">
|
|
49
|
+
<div className="studio-parameters__head">
|
|
50
|
+
<span>{translate('Studio.parameters.presenceHint')}</span>
|
|
51
|
+
<Button type="button" tone="ghost" size="sm" disabled={disabled} onClick={onReset}>
|
|
52
|
+
{translate('Studio.parameters.reset')}
|
|
53
|
+
</Button>
|
|
54
|
+
</div>
|
|
55
|
+
{children}
|
|
49
56
|
</div>
|
|
50
|
-
{children}
|
|
51
57
|
</section>
|
|
52
58
|
);
|
|
53
59
|
}
|