feat(vscode): part 1 - foundation utils and gateway bridge#333
feat(vscode): part 1 - foundation utils and gateway bridge#333bernaferrari wants to merge 8 commits intoKilo-Org:devfrom
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
| } | ||
|
|
||
| export function buildWebviewCsp(input: WebviewCspInput): string { | ||
| return [ |
There was a problem hiding this comment.
this seems duplicate with the CSP in KiloProvider; I have no problem with extracting it, but I don't think it should be duplicated.
| @@ -0,0 +1,32 @@ | |||
| import * as vscode from "vscode" | |||
There was a problem hiding this comment.
This file should be integrated with / deduplicated with src/services/autocomplete/shims/TelemetryStub.ts
| @@ -0,0 +1,54 @@ | |||
| import * as vscode from "vscode" | |||
There was a problem hiding this comment.
why do we want this instead of just plain old console logs?
There was a problem hiding this comment.
the goal was to emit on both console.log and vscode output channel, so it is easy for user no matter their preference.. I can remove it, if you prefer.
| /* ===== Typography ===== | ||
| * opencode UI components use --font-family-sans/mono variables. | ||
| * Bridge them to VS Code-native font settings inside the extension. | ||
| */ |
| } | ||
|
|
||
| function getOrganizationId(auth: any): string | undefined { | ||
| return auth?.type === "oauth" ? auth.accountId : undefined |
There was a problem hiding this comment.
I don't get this logic; Why is the organization the accountId, and it seems like a user only has one org looking at this code, but I'd say they can have multiple?
| return c.json(settings) | ||
| }, | ||
| ) | ||
| .get( |
There was a problem hiding this comment.
I'd prefer to keep the session management out of this, as I'd need someone else to review it.
| @@ -0,0 +1,91 @@ | |||
| import { KILO_API_BASE } from "./constants.js" | |||
There was a problem hiding this comment.
As said below, i think the remote sessions need to be in a separate PR
There was a problem hiding this comment.
I'll move them to a separate PR
There was a problem hiding this comment.
You can take a break from this PR. I'll get your points addressed soon.
|
I simplified a lot (maybe too much 🤣), fixing what you commented. Check if you prefer landing this PR or if you prefer me to close and have these changes as part of the others (like marketplace/etc). |
I'm trying to split #321 and this is part 1.
This is AI generated:
Part 1/20: Foundation Utilities + Gateway Plumbing
This PR is the first slice of the #321 split and focuses on low-risk foundation pieces that unblock later feature PRs.
Mapping to migration plan
This PR advances items already marked in https://github.com/Kilo-Org/kilo/blob/4c1f5168631366360ecdbe0106495925455d8d78/packages/kilo-vscode/docs/opencode-migration-plan.md:
infrastructure/dedicated-output-channel.md(logger foundation)openExternalURLs