GeezerVison is showing github.com — core: add debug logging to troubleshoot share compaction loading · c0debrain/opencode@4acb645
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/enterprise/src/core
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .opencode/opencode.jsonc +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | { |
2 | 2 | "$schema": "https://opencode.ai/config.json", |
3 | 3 | "plugin": ["opencode-openai-codex-auth"], |
4 | | - // "enterprise": { |
5 | | - // "url": "https://enterprise.dev.opencode.ai", |
6 | | - // }, |
| 4 | + "enterprise": { |
| 5 | + "url": "https://enterprise.dev.opencode.ai", |
| 6 | + }, |
7 | 7 | "provider": { |
8 | 8 | "opencode": { |
9 | 9 | "options": { |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/enterprise/src/core/share.ts +4-1Lines changed: 4 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,16 +85,19 @@ export namespace Share { |
85 | 85 | } |
86 | 86 |
|
87 | 87 | export async function data(shareID: string) { |
| 88 | + console.log("reading compaction") |
88 | 89 | const compaction: Compaction = (await Storage.read<Compaction>(["share_compaction", shareID])) ?? { |
89 | 90 | data: [], |
90 | 91 | event: undefined, |
91 | 92 | } |
92 | | - |
| 93 | + console.log("reading pending events") |
93 | 94 | const list = await Storage.list({ |
94 | 95 | prefix: ["share_event", shareID], |
95 | 96 | end: compaction.event, |
96 | 97 | }).then((x) => x.toReversed()) |
97 | 98 |
|
| 99 | + console.log("compacting", list.length) |
| 100 | + |
98 | 101 | const data = await Promise.all(list.map(async (event) => await Storage.read<Data[]>(event))).then((x) => x.flat()) |
99 | 102 | for (const item of data) { |
100 | 103 | if (!item) continue |
|