mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Fix a couple bugs
This commit is contained in:
parent
3271171646
commit
6d74d355ce
@ -12,13 +12,10 @@ export async function getRepositoryContents(repositoryId: string): Promise<strin
|
||||
// Remotely create an imported repository from the given contents.
|
||||
export async function createRepositoryImported(reason: string, repositoryContents: string): Promise<string> {
|
||||
const rv = (await sendCommandDedicatedClient({
|
||||
method: 'Nut.createRepository',
|
||||
method: 'Nut.importRepository',
|
||||
params: {
|
||||
repositoryContents,
|
||||
origin: {
|
||||
kind: 'imported',
|
||||
reason,
|
||||
},
|
||||
reason,
|
||||
},
|
||||
})) as { repositoryId: string };
|
||||
return rv.repositoryId;
|
||||
|
@ -110,11 +110,17 @@ class ChatManager {
|
||||
});
|
||||
}
|
||||
|
||||
finishSimulationData() {
|
||||
async finishSimulationData() {
|
||||
assert(this.client, 'Chat has been destroyed');
|
||||
assert(!this.simulationFinished, 'Simulation has been finished');
|
||||
|
||||
this.simulationFinished = true;
|
||||
|
||||
const chatId = await this.chatIdPromise;
|
||||
await this.client.sendCommand({
|
||||
method: 'Nut.finishSimulationData',
|
||||
params: { chatId },
|
||||
});
|
||||
}
|
||||
|
||||
async sendChatMessage(messages: Message[], references: ChatReference[], onResponsePart: ChatResponsePartCallback) {
|
||||
|
Loading…
Reference in New Issue
Block a user