Skip to content

Commit 168d21d

Browse files
committed
feat: add clarification response handling and update schema change batch response interface
1 parent 7675dc6 commit 168d21d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

frontend/src/app/components/edit-database-schema/edit-database-schema.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,14 @@ export class EditDatabaseSchemaComponent implements OnInit {
162162
return next;
163163
});
164164
} else {
165+
const clarification = result.assistantMessage?.trim();
165166
this.messages.update((msgs) => [
166167
...msgs,
167168
{
168169
role: 'ai',
169-
text: 'I could not generate any schema changes for that prompt. Could you describe your database in more detail?',
170+
text:
171+
clarification ||
172+
'I could not generate any schema changes for that prompt. Could you describe your database in more detail?',
170173
},
171174
]);
172175
}

frontend/src/app/services/table-schema.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ export interface SchemaChangeResponse {
5757
}
5858

5959
export interface SchemaChangeBatchResponse {
60-
batchId: string;
60+
batchId: string | null;
6161
changes: SchemaChangeResponse[];
6262
threadId?: string | null;
63+
assistantMessage?: string | null;
6364
}
6465

6566
@Injectable({

0 commit comments

Comments
 (0)