mirror of
https://github.com/Heretek-AI/GDevelop-Unlocked.git
synced 2026-11-07 10:55:58 -10:00
Merge pull request #32 from Heretek-AI/ticket-31-resume-steer-shape
#31 resume steer: emit AiRequestUserMessage array shape
This commit is contained in:
3 files changed
+22
-3
No files matched your search
@@ -86,7 +86,17 @@ export const buildResumeUpdate = (aiRequest: any): any => {
|
||||
{
|
||||
type: 'message',
|
||||
role: 'user',
|
||||
content: buildResumeSteerMessage(reason),
|
||||
// Array item shape, matching AiRequestUserMessage: the chat
|
||||
// message list maps/filter over message.content (#31: a bare
|
||||
// string here crashed the renderer with
|
||||
// "s.content.map is not a function").
|
||||
content: [
|
||||
{
|
||||
type: 'user_request',
|
||||
status: 'completed',
|
||||
text: buildResumeSteerMessage(reason),
|
||||
},
|
||||
],
|
||||
messageId: `resume-steer-${Date.now()}`,
|
||||
},
|
||||
]
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
"sha256": "12df5f3f54a52e3c2c72646e6825360206eec0521dd6f15d73cd39660b21e0d2"
|
||||
},
|
||||
"AiGeneration/Studio/UseStudioRuntime.js": {
|
||||
"bytes": 14337,
|
||||
"bytes": 14735,
|
||||
"origin": "newIDE/app/src/AiGeneration/Studio/UseStudioRuntime.js",
|
||||
"sha256": "684f5f46c18f6b40dfadf01756ae62621e9c28a82d3a74a423bea61e09014cc3"
|
||||
"sha256": "a3bb06c3d436dd869f938b86d2917626e8b368f7f61b530f3f4bbd77f71a3807"
|
||||
},
|
||||
"dev-harness/mock-ai-provider.js": {
|
||||
"bytes": 9862,
|
||||
|
||||
@@ -619,6 +619,15 @@ describe('integration: T05 suspended UI and resume (terminal status card)', () =
|
||||
assert.ok(resumeSlice.includes("status: 'ready'"), 'resume must reset status to ready');
|
||||
assert.ok(resumeSlice.includes('error: null'), 'resume must clear the error');
|
||||
assert.ok(resumeSlice.includes('buildResumeSteerMessage'), 'resume must attach the steer prompt');
|
||||
// #31: the steer message content must be the AiRequestUserMessage array
|
||||
// shape ({type:'user_request', status:'completed', text}) — the chat
|
||||
// message list maps/filters over message.content, and a bare string
|
||||
// crashed the renderer (s.content.map is not a function).
|
||||
assert.ok(resumeSlice.includes("type: 'user_request'"), 'resume steer must use the user_request item shape');
|
||||
assert.ok(
|
||||
!resumeSlice.includes('content: buildResumeSteerMessage(reason),'),
|
||||
'resume steer must not use bare string content'
|
||||
);
|
||||
// Clear Stalled purges exactly gd-custom-ai-requests.
|
||||
assert.ok(
|
||||
src.includes("gd-custom-ai-requests"),
|
||||
|
||||
Reference in new issue
Block a user