Skip to content

Commit 1dcfcf7

Browse files
committed
update frontend and auth
1 parent de8f62c commit 1dcfcf7

File tree

15 files changed

+394
-192
lines changed

15 files changed

+394
-192
lines changed

.changeset/hungry-beans-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"opencontrol": patch
3+
---
4+
5+
update frontend and auth

bun.lock

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/bun/index.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { create } from "opencontrol"
22
import { tool } from "opencontrol/tool"
33
import { z } from "zod"
44
import AWS from "aws-sdk"
5+
import { anthropic } from "@ai-sdk/anthropic"
56

67
const aws = tool({
78
name: "aws",
@@ -12,16 +13,21 @@ const aws = tool({
1213
args: z
1314
.record(z.string(), z.any())
1415
.optional()
15-
.describe("Arguments to pass to the command"),
16+
.describe("Arguments to pass to the command as json"),
1617
}),
1718
async run(input) {
1819
// @ts-ignore
19-
const client = new AWS[input.client]()
20-
return await client[input.command](input.args).promise()
20+
const client = AWS[input.client]
21+
if (!client) throw new Error(`Client ${input.client} not found`)
22+
const instance = new client()
23+
return await instance[input.command](input.args).promise()
2124
},
2225
})
2326

2427
export default create({
25-
anthropicApiKey: process.env.ANTHROPIC_API_KEY,
2628
tools: [aws],
29+
model: anthropic("claude-3-7-sonnet-latest"),
30+
password: "password",
31+
// model: google("gemini-2.0-flash-exp"),
32+
// model: openai("o3-mini"),
2733
})

examples/bun/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"private": true,
44
"version": "0.0.9",
55
"dependencies": {
6+
"@ai-sdk/anthropic": "1.1.17",
7+
"@ai-sdk/google": "1.1.25",
8+
"@ai-sdk/openai": "1.2.5",
69
"aws-sdk": "2.1692.0",
710
"opencontrol": "workspace:*",
811
"zod": "3.24.2"

packages/frontend/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1" />
5+
<meta
6+
name="viewport"
7+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
8+
/>
69
<meta name="theme-color" content="#000000" />
710
<link rel="shortcut icon" type="image/ico" href="/src/assets/favicon.ico" />
8-
<title>Solid App</title>
11+
<title>opencontrol</title>
912
</head>
1013
<body>
1114
<noscript>You need to enable JavaScript to run this app.</noscript>

packages/frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"dependencies": {
2121
"@ai-sdk/anthropic": "1.1.17",
2222
"@ai-sdk/openai": "1.2.5",
23+
"opencontrol": "workspace:*",
2324
"ai": "4.1.61",
25+
"hono": "4.7.4",
2426
"solid-js": "^1.9.5"
2527
}
2628
}

0 commit comments

Comments
 (0)