mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-26 15:55:45 +00:00
fix: auto upgrade toast message (#4625)
Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: opencode <opencode@sst.dev>
This commit is contained in:
@@ -26,8 +26,6 @@ process.on("uncaughtException", (e) => {
|
||||
})
|
||||
})
|
||||
|
||||
upgrade()
|
||||
|
||||
let server: Bun.Server<undefined>
|
||||
export const rpc = {
|
||||
async server(input: { port: number; hostname: string }) {
|
||||
@@ -42,6 +40,14 @@ export const rpc = {
|
||||
throw e
|
||||
}
|
||||
},
|
||||
async checkUpgrade(input: { directory: string }) {
|
||||
await Instance.provide({
|
||||
directory: input.directory,
|
||||
fn: async () => {
|
||||
await upgrade().catch(() => {})
|
||||
},
|
||||
})
|
||||
},
|
||||
async shutdown() {
|
||||
Log.Default.info("worker shutting down")
|
||||
await Instance.disposeAll()
|
||||
|
||||
Reference in New Issue
Block a user