Skip to content

Commit 3765562

Browse files
fix building of templates
1 parent d544e9d commit 3765562

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/Sandboxes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import { Sandbox } from "./Sandbox";
1111
import {
1212
getDefaultTemplateId,
13+
getDefaultTemplateTag,
1314
getStartOptions,
1415
getStartResponse,
1516
handleResponse,
@@ -60,7 +61,7 @@ export async function startVm(
6061
*/
6162
export class Sandboxes {
6263
get defaultTemplateId() {
63-
return getDefaultTemplateId(this.apiClient);
64+
return getDefaultTemplateTag(this.apiClient);
6465
}
6566

6667
constructor(private apiClient: Client) {}

src/utils/api.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@ export function getBaseUrl(token: string) {
5151
return "https://api.together.ai/csb/sdk";
5252
}
5353

54-
export function getDefaultTemplateId(apiClient: Client): string {
54+
export function getDefaultTemplateTag(apiClient: Client): string {
5555
if (apiClient.getConfig().baseUrl?.includes("codesandbox.stream")) {
5656
return "7ngcrf";
5757
}
5858

5959
return "pt_TRkPA6ypYZ7cRLQYgCmRHs";
6060
}
6161

62+
export function getDefaultTemplateId(apiClient: Client): string {
63+
if (apiClient.getConfig().baseUrl?.includes("codesandbox.stream")) {
64+
return "7ngcrf";
65+
}
66+
67+
return "pcz35m";
68+
}
69+
6270
export function handleResponse<D, E>(
6371
result: Awaited<{ data?: { data?: D }; error?: E; response: Response }>,
6472
errorPrefix: string

0 commit comments

Comments
 (0)