Improve async share handling and enhance diagnostic output with filenames
🤖 Generated with opencode Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
@@ -65,7 +65,11 @@ export namespace Session {
|
|||||||
log.info("created", result);
|
log.info("created", result);
|
||||||
state().sessions.set(result.id, result);
|
state().sessions.set(result.id, result);
|
||||||
await Storage.writeJSON("session/info/" + result.id, result);
|
await Storage.writeJSON("session/info/" + result.id, result);
|
||||||
await share(result.id);
|
share(result.id).then((shareID) => {
|
||||||
|
update(result.id, (draft) => {
|
||||||
|
draft.shareID = shareID;
|
||||||
|
});
|
||||||
|
});
|
||||||
Bus.publish(Event.Updated, {
|
Bus.publish(Event.Updated, {
|
||||||
info: result,
|
info: result,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export const edit = Tool.define({
|
|||||||
output += `\nThis file has errors, please fix\n<file_diagnostics>\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</file_diagnostics>\n`;
|
output += `\nThis file has errors, please fix\n<file_diagnostics>\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</file_diagnostics>\n`;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
output += `\n<project_diagnostics>\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</project_diagnostics>\n`;
|
output += `\n<project_diagnostics>\n${file}\n${issues.map(LSP.Diagnostic.pretty).join("\n")}\n</project_diagnostics>\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user