summaryrefslogtreecommitdiffhomepage
path: root/cloud/app/src
diff options
context:
space:
mode:
authorFrank <[email protected]>2025-08-29 19:34:56 -0400
committerFrank <[email protected]>2025-08-29 19:34:58 -0400
commitc3a25eff78635725472096fe2626021ee50f36b0 (patch)
treeadecb00a9340d2baea27b3f30f254054810d9490 /cloud/app/src
parentb40c02e2583c6e35f97849e98f66609e67dac322 (diff)
downloadopencode-c3a25eff78635725472096fe2626021ee50f36b0.tar.gz
opencode-c3a25eff78635725472096fe2626021ee50f36b0.zip
wip: cloud
Diffstat (limited to 'cloud/app/src')
-rw-r--r--cloud/app/src/global.d.ts1
-rw-r--r--cloud/app/src/routes/auth/callback.ts3
-rw-r--r--cloud/app/src/routes/gateway/v1/chat/completions.ts2
-rw-r--r--cloud/app/src/routes/index.tsx6
-rw-r--r--cloud/app/src/routes/stripe/webhook.ts2
5 files changed, 8 insertions, 6 deletions
diff --git a/cloud/app/src/global.d.ts b/cloud/app/src/global.d.ts
index dc6f10c22..a44606d2e 100644
--- a/cloud/app/src/global.d.ts
+++ b/cloud/app/src/global.d.ts
@@ -1 +1,2 @@
/// <reference types="@solidjs/start/env" />
+declare module "cloudflare:workers"
diff --git a/cloud/app/src/routes/auth/callback.ts b/cloud/app/src/routes/auth/callback.ts
index edeb35790..4e38df07e 100644
--- a/cloud/app/src/routes/auth/callback.ts
+++ b/cloud/app/src/routes/auth/callback.ts
@@ -1,6 +1,7 @@
import { redirect } from "@solidjs/router"
import type { APIEvent } from "@solidjs/start/server"
-import { AuthClient, useAuthSession } from "~/context/auth"
+import { AuthClient } from "~/context/auth"
+import { useAuthSession } from "~/context/auth.session"
export async function GET(input: APIEvent) {
const url = new URL(input.request.url)
diff --git a/cloud/app/src/routes/gateway/v1/chat/completions.ts b/cloud/app/src/routes/gateway/v1/chat/completions.ts
index f69feade1..95c2c268d 100644
--- a/cloud/app/src/routes/gateway/v1/chat/completions.ts
+++ b/cloud/app/src/routes/gateway/v1/chat/completions.ts
@@ -1,4 +1,4 @@
-import { Resource } from "sst"
+import { Resource } from "@opencode/cloud-core/util/resource.js"
import { Billing } from "@opencode/cloud-core/billing.js"
import type { APIEvent } from "@solidjs/start/server"
import { Database, eq, sql } from "@opencode/cloud-core/drizzle/index.js"
diff --git a/cloud/app/src/routes/index.tsx b/cloud/app/src/routes/index.tsx
index b9344bc55..5a4e07978 100644
--- a/cloud/app/src/routes/index.tsx
+++ b/cloud/app/src/routes/index.tsx
@@ -31,8 +31,6 @@ const isLoggedIn = query(async () => {
return false
}, "isLoggedIn")
-
-
export default function Home() {
createAsync(() => isLoggedIn(), {
deferStream: true,
@@ -83,7 +81,9 @@ export default function Home() {
</button>
</div>
<div data-slot="right">
- <a href="/auth/authorize" target="_self">Login</a>
+ <a href="/auth/authorize" target="_self">
+ Login
+ </a>
</div>
</section>
diff --git a/cloud/app/src/routes/stripe/webhook.ts b/cloud/app/src/routes/stripe/webhook.ts
index 258ebe413..29f0f2484 100644
--- a/cloud/app/src/routes/stripe/webhook.ts
+++ b/cloud/app/src/routes/stripe/webhook.ts
@@ -1,4 +1,3 @@
-import { Resource } from "sst"
import { Billing } from "@opencode/cloud-core/billing.js"
import type { APIEvent } from "@solidjs/start/server"
import { Database, eq, sql } from "@opencode/cloud-core/drizzle/index.js"
@@ -6,6 +5,7 @@ import { BillingTable, PaymentTable } from "@opencode/cloud-core/schema/billing.
import { Identifier } from "@opencode/cloud-core/identifier.js"
import { centsToMicroCents } from "@opencode/cloud-core/util/price.js"
import { Actor } from "@opencode/cloud-core/actor.js"
+import { Resource } from "@opencode/cloud-core/util/resource.js"
export async function POST(input: APIEvent) {
const body = await Billing.stripe().webhooks.constructEventAsync(