Skip to content

Commit 914582d

Browse files
committed
fix: update import paths to resolve TypeScript module resolution errors
This commit corrects import statements across web client components and test files to use the current package name 'opencode-pty' instead of the outdated 'opencode-pty-test'. Previously, these mismatched paths caused TypeScript compilation failures due to unresolved module exports defined in package.json. The changes ensure proper module resolution, fixing build errors and maintaining compatibility with the package's export mappings.
1 parent 3aa35f5 commit 914582d

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/web/client/components/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, useEffect, useCallback } from 'react'
2-
import type { Session } from 'opencode-pty-test/shared/types'
2+
import type { Session } from 'opencode-pty/shared/types'
33

44
import { useWebSocket } from '../hooks/useWebSocket.ts'
55
import { useSessionManager } from '../hooks/useSessionManager.ts'

src/web/client/components/Sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Session } from 'opencode-pty-test/shared/types'
1+
import type { Session } from 'opencode-pty/shared/types'
22

33
interface SidebarProps {
44
sessions: Session[]

src/web/client/hooks/useSessionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useCallback } from 'react'
2-
import type { Session } from 'opencode-pty-test/shared/types'
2+
import type { Session } from 'opencode-pty/shared/types'
33

44
interface UseSessionManagerOptions {
55
activeSession: Session | null

src/web/client/hooks/useWebSocket.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { useState, useEffect, useRef } from 'react'
2-
import type { Session } from 'opencode-pty-test/shared/types'
2+
import type { Session } from 'opencode-pty/shared/types'
33
import {
44
WEBSOCKET_PING_INTERVAL,
55
RETRY_DELAY,
66
SKIP_AUTOSELECT_KEY,
7-
} from 'opencode-pty-test/shared/constants'
7+
} from 'opencode-pty/shared/constants'
88

99
interface UseWebSocketOptions {
1010
activeSession: Session | null

test/npm-pack-integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('npm pack integration', () => {
6161

6262
it('packs, installs, and serves assets correctly', async () => {
6363
// 1) Create temp workspace
64-
tempDir = mkdtempSync(join(tmpdir(), 'opencode-pty-test-'))
64+
tempDir = mkdtempSync(join(tmpdir(), 'opencode-pty-'))
6565

6666
// 2) Pack the package
6767
const pack = await run(['npm', 'pack'])
@@ -86,7 +86,7 @@ describe('npm pack integration', () => {
8686
copyFileSync(join(process.cwd(), 'test/start-server.ts'), join(tempDir, 'start-server.ts'))
8787

8888
// Verify the package structure
89-
const packageDir = join(tempDir, 'node_modules/opencode-pty-test')
89+
const packageDir = join(tempDir, 'node_modules/opencode-pty')
9090
expect(existsSync(join(packageDir, 'src/plugin/pty/manager.ts'))).toBe(true)
9191
expect(existsSync(join(packageDir, 'dist/web/index.html'))).toBe(true)
9292
serverProcess = Bun.spawn(['bun', 'run', 'start-server.ts'], {

test/start-server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { initManager, manager } from 'opencode-pty-test/src/plugin/pty/manager'
2-
import { startWebServer } from 'opencode-pty-test/src/web/server/server'
1+
import { initManager, manager } from 'opencode-pty/src/plugin/pty/manager'
2+
import { startWebServer } from 'opencode-pty/src/web/server/server'
33

44
// Set NODE_ENV if not set
55
if (!process.env.NODE_ENV) {

0 commit comments

Comments
 (0)