Skip to content

Commit 58f8e4c

Browse files
committed
fix submitting order
1 parent cf48bc0 commit 58f8e4c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

client/web/angular-customer-app/src/app/services/agents/orderingAgent/orderTools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const submitOrder = (readyForSubmission: boolean) => {
115115
// console.info('[submitOrder] User has not approved the order.');
116116
// return { status: 'MAKE_CHANGES' };
117117
// }
118-
return getAgentState();
118+
return {state:getAgentState(), message: 'MarkedAsReady'};
119119
}
120120

121121
export const suggestResponses = (responses: string[]) => {

client/web/angular-customer-app/src/app/services/coffee.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export class CoffeeService {
8282
const functionResults: {functionResponse: {name: string, response: any}}[] = [];
8383
for (const call of functionCalls) {
8484
const result = handleOrderingFunctionCall(call.name, call.args);
85+
if(call.name == "submit_order") {
86+
break;
87+
}
8588
if(call.name !== "suggest_responses") {
8689
functionResults.push({functionResponse: {name: call.name, response: result}});
8790
}
@@ -205,7 +208,8 @@ export class CoffeeService {
205208
orderSubmitted: true,
206209
order: getAgentState().inProgressOrder || []
207210
};
208-
clearOrder();
211+
const result = clearOrder();
212+
console.log(result);
209213
return x;
210214
})
211215
);

0 commit comments

Comments
 (0)