GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor(core): consolidate pty service (#30537) · argszero/opencode@932fb6c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • bun.lock
  • package.json
  • packages
    • core
      • package.json
      • script
        • fix-node-pty.ts
      • src
        • location-layer.ts
        • pty.ts
        • pty
          • input.ts
          • pty.bun.ts
          • pty.node.ts
          • pty.ts
          • schema.ts
          • ticket.ts
      • test/pty
        • info-schema.test.ts
        • input.test.ts
        • pty-output-isolation.test.ts
        • pty-session.test.ts
        • ticket.test.ts
    • opencode
      • package.json
      • src
        • effect
          • app-runtime.ts
        • pty-preparation.ts
        • server/routes/instance/httpapi
          • groups
            • pty.ts
          • handlers
            • pty.ts
          • server.ts
      • test
        • pty
          • pty-output-isolation.test.ts
          • pty-session.test.ts
          • pty-shell.test.ts
        • server
          • httpapi-instance-route-auth.test.ts
          • httpapi-pty.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bun.lock‎

Copy file name to clipboardExpand all lines: bun.lock
+2-2Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"lint": "oxlint",
1616
"typecheck": "bun turbo typecheck",
1717
"upgrade-opentui": "bun run script/upgrade-opentui.ts",
18-
"postinstall": "bun run --cwd packages/opencode fix-node-pty",
18+
"postinstall": "bun run --cwd packages/core fix-node-pty",
1919
"prepare": "husky",
2020
"random": "echo 'Random script'",
2121
"sso": "aws sso login --sso-session=opencode --no-browser",
Collapse file

‎packages/core/package.json‎

Copy file name to clipboardExpand all lines: packages/core/package.json
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"scripts": {
99
"db": "bun drizzle-kit",
1010
"migration": "bun run script/migration.ts",
11+
"fix-node-pty": "bun run script/fix-node-pty.ts",
1112
"test": "bun test",
1213
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
1314
"typecheck": "tsgo --noEmit"
@@ -23,6 +24,11 @@
2324
"bun": "./src/database/sqlite.bun.ts",
2425
"node": "./src/database/sqlite.node.ts",
2526
"default": "./src/database/sqlite.bun.ts"
27+
},
28+
"#pty": {
29+
"bun": "./src/pty/pty.bun.ts",
30+
"node": "./src/pty/pty.node.ts",
31+
"default": "./src/pty/pty.bun.ts"
2632
}
2733
},
2834
"devDependencies": {
@@ -69,6 +75,7 @@
6975
"@effect/opentelemetry": "catalog:",
7076
"@effect/platform-node": "catalog:",
7177
"@effect/sql-sqlite-bun": "catalog:",
78+
"@lydell/node-pty": "catalog:",
7279
"@npmcli/arborist": "9.4.0",
7380
"@npmcli/config": "10.8.1",
7481
"@opencode-ai/effect-drizzle-sqlite": "workspace:*",
@@ -80,6 +87,7 @@
8087
"@parcel/watcher": "2.5.1",
8188
"@openrouter/ai-sdk-provider": "2.8.1",
8289
"ai-gateway-provider": "3.1.2",
90+
"bun-pty": "0.4.8",
8391
"cross-spawn": "catalog:",
8492
"drizzle-orm": "catalog:",
8593
"effect": "catalog:",
Collapse file

‎packages/opencode/script/fix-node-pty.ts‎ ‎packages/core/script/fix-node-pty.ts‎packages/opencode/script/fix-node-pty.ts renamed to packages/core/script/fix-node-pty.ts

Copy file name to clipboard
File renamed without changes.
Collapse file

‎packages/core/src/location-layer.ts‎

Copy file name to clipboardExpand all lines: packages/core/src/location-layer.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { FileSystem } from "./filesystem"
2121
import { Watcher } from "./filesystem/watcher"
2222
import { ProjectReference } from "./project-reference"
2323
import { RepositoryCache } from "./repository-cache"
24+
import { Pty } from "./pty"
2425

2526
export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("@opencode/example/LocationServiceMap", {
2627
lookup: (ref: Location.Ref) => {
@@ -37,6 +38,7 @@ export class LocationServiceMap extends LayerMap.Service<LocationServiceMap>()("
3738
PermissionV2.locationLayer,
3839
FileSystem.locationLayer,
3940
Watcher.locationLayer,
41+
Pty.locationLayer,
4042
).pipe(Layer.provideMerge(location), Layer.fresh)
4143
},
4244
idleTimeToLive: "60 minutes",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.