Skip to content

Commit 5a0910e

Browse files
committed
chore: better local dev with stainless script
1 parent 1dffabc commit 5a0910e

70 files changed

Lines changed: 11281 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
.env
66
.idea
77
.vscode
8+
openapi.json

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"packageManager": "bun@1.2.14",
77
"scripts": {
88
"typecheck": "bun run --filter='*' typecheck",
9+
"stainless": "bun run ./packages/opencode/src/index.ts serve ",
910
"postinstall": "./scripts/hooks"
1011
},
1112
"workspaces": {

packages/tui/go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ require (
2020
rsc.io/qr v0.2.0
2121
)
2222

23+
replace github.com/sst/opencode-sdk-go => ./sdk
24+
2325
require golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect
2426

2527
require (

packages/tui/go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
181181
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
182182
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
183183
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
184-
github.com/sst/opencode-sdk-go v0.1.0-alpha.8 h1:Tp7nbckbMCwAA/ieVZeeZCp79xXtrPMaWLRk5mhNwrw=
185-
github.com/sst/opencode-sdk-go v0.1.0-alpha.8/go.mod h1:uagorfAHZsVy6vf0xY6TlQraM4uCILdZ5tKKhl1oToM=
186184
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
187185
github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
188186
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Development",
5+
"image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
6+
"postCreateCommand": "go mod tidy"
7+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ${{ github.repository == 'stainless-sdks/opencode-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Setup go
26+
uses: actions/setup-go@v5
27+
with:
28+
go-version-file: ./go.mod
29+
30+
- name: Run lints
31+
run: ./scripts/lint
32+
test:
33+
timeout-minutes: 10
34+
name: test
35+
runs-on: ${{ github.repository == 'stainless-sdks/opencode-go' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
36+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Setup go
41+
uses: actions/setup-go@v5
42+
with:
43+
go-version-file: ./go.mod
44+
45+
- name: Bootstrap
46+
run: ./scripts/bootstrap
47+
48+
- name: Run tests
49+
run: ./scripts/test

packages/tui/sdk/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.prism.log
2+
codegen.log
3+
Brewfile.lock.json
4+
.idea/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0-alpha.8"
3+
}

packages/tui/sdk/.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 20
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/opencode%2Fopencode-945f9da9e9a4c4008834deef63e4346c0076e020eed3d3c98c249095033c1ac5.yml
3+
openapi_spec_hash: 522a44f6cb0677435fe2ac7693848ad7
4+
config_hash: 6c8822d278ba83456e5eed6d774ca230

packages/tui/sdk/Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
brew "go"

0 commit comments

Comments
 (0)