mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
sync
This commit is contained in:
parent
dfd67cd922
commit
06aa1f49b8
1 changed files with 5 additions and 5 deletions
|
|
@ -130,7 +130,7 @@ export namespace Project {
|
|||
export async function discover(input: Info) {
|
||||
if (input.vcs !== "git") return
|
||||
if (input.icon) return
|
||||
const glob = new Bun.Glob("**/{favicon,icon,logo}.{ico,png,svg,jpg,jpeg,webp}")
|
||||
const glob = new Bun.Glob("**/{favicon}.{ico,png,svg,jpg,jpeg,webp}")
|
||||
for await (const match of glob.scan({
|
||||
cwd: input.worktree,
|
||||
absolute: true,
|
||||
|
|
@ -143,11 +143,11 @@ export namespace Project {
|
|||
const base64 = Buffer.from(buffer).toString("base64")
|
||||
const mime = file.type || "image/png"
|
||||
const url = `data:${mime};base64,${base64}`
|
||||
await Storage.update<Info>(["project", input.id], (draft) => {
|
||||
draft.icon = {
|
||||
...draft.icon,
|
||||
await update({
|
||||
projectID: input.id,
|
||||
icon: {
|
||||
url,
|
||||
}
|
||||
},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue