Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Jan 7, 2024
1 parent ac6f733 commit 9293418
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
5 changes: 5 additions & 0 deletions client/vscode/test/fixtures/workspace/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"opencodegraph.debug": true,
"cody.autocomplete.experimental.graphContext": "opencodegraph",
"opencodegraph.providers": {
"../../../../../../provider/docs/dist/src/provider/provider.js": {
"index": "http://localhost:5900/@fs/home/sqs/tmp/ocg-provider-docs/vite-docs-web.index.json",
},
},
"opencodegraph.providers2": {
// "https://sourcegraph.test:3443/.api/opencodegraph": true,
// "../../../../../../provider/hello-world/dist/index.js": true,
"https://opencodegraph.org/npm/@opencodegraph/provider-hello-world": true,
Expand Down
9 changes: 8 additions & 1 deletion lib/client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ export function observeAnnotations<R extends Range>(
}
return (a.range?.start.character ?? 0) - (b.range?.start.character ?? 0)
})
)
),
tap(anns => {
if (LOG_ANNOTATIONS) {
logger?.(`got ${anns.length} annotations: ${JSON.stringify(anns)}`)
}
})
)
}

const LOG_ANNOTATIONS = true
6 changes: 3 additions & 3 deletions provider/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
"directory": "provider/docs"
},
"type": "module",
"main": "dist/src/provider/provider.js",
"types": "dist/src/provider/provider.d.ts",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist",
"!**/*.test.*",
"README.md"
],
"sideEffects": false,
"scripts": {
"build": "tsc --build",
"build": "tsc --build && esbuild --platform browser --bundle --outfile dist/index.js",
"test": "vitest",
"create-archive": "node --no-warnings=ExperimentalWarning --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only bin/create-archive.ts",
"create-index": "node --no-warnings=ExperimentalWarning --experimental-specifier-resolution=node --loader ts-node/esm/transpile-only bin/create-index.ts",
Expand Down

0 comments on commit 9293418

Please sign in to comment.