-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3771 from continuedev/nate/yaml-loading
yaml updates
- Loading branch information
Showing
40 changed files
with
1,166 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { | ||
clientRender, | ||
PlatformClient, | ||
SecretStore, | ||
} from "@continuedev/config-yaml"; | ||
|
||
import { IDE } from "../.."; | ||
import { ControlPlaneClient } from "../../control-plane/client"; | ||
|
||
export async function clientRenderHelper( | ||
unrolledAssistant: string, | ||
ide: IDE, | ||
controlPlaneClient: ControlPlaneClient, | ||
) { | ||
const ideSecretStore: SecretStore = { | ||
get: async function (secretName: string): Promise<string | undefined> { | ||
const results = await ide.readSecrets([secretName]); | ||
return results[secretName]; | ||
}, | ||
set: async function ( | ||
secretName: string, | ||
secretValue: string, | ||
): Promise<void> { | ||
return await ide.writeSecrets({ | ||
[secretName]: secretValue, | ||
}); | ||
}, | ||
}; | ||
|
||
const platformClient: PlatformClient = { | ||
resolveFQSNs: controlPlaneClient.resolveFQSNs.bind(controlPlaneClient), | ||
}; | ||
|
||
const userId = await controlPlaneClient.userId; | ||
return await clientRender( | ||
unrolledAssistant, | ||
ideSecretStore, | ||
userId ? platformClient : undefined, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.