Просмотр исходного кода

cleanup: drop leftovers from the retired HTTP-serving revision

ZiyaZhang 2 месяцев назад
Родитель
Сommit
87d0fc6fc4

+ 0 - 1
packages/client/connection/src/client/fixture.ts

@@ -2362,7 +2362,6 @@ export function createFixtureApi(options: FixtureOptions = {}): ApiProxy {
       })
       return Promise.resolve({ accepted: true })
     },
-
   }
 }
 

+ 1 - 2
packages/client/connection/src/index.ts

@@ -13,7 +13,7 @@ export { API_PATH } from './api-path.ts'
 /** Stable Cordis plugin name. */
 export const name = 'client-connection'
 
-/** Services required before mounting the routes. */
+/** Services required before mounting the route. */
 export const inject = ['httpServer', 'apiProxy']
 
 /** Plugin config: the deployment's non-loopback serving authorities. */
@@ -96,5 +96,4 @@ export function apply(ctx: Context, config?: ConnectionConfig): void {
     },
   }
   ctx.effect(() => ctx.httpServer.register(route), 'client-connection: /api route')
-
 }

+ 0 - 1
packages/client/connection/tests/client-apply.spec.ts

@@ -62,5 +62,4 @@ describe('connection client apply', () => {
     }
     expect(seen.some(u => u.includes('/api/'))).toBe(true)
   })
-
 })

+ 5 - 8
packages/client/connection/tests/node-half.spec.ts

@@ -30,15 +30,11 @@ function fakeRequest(headers: Record<string, string>, url = `${API_PATH}/session
 }
 
 /** Response recorder compatible with both the fence's short-circuit and the bridge. */
-function fakeResponse(): { response: ServerResponse; state: { status?: number; body?: unknown; headers?: Record<string, string> } } {
-  const state: { status?: number; body?: unknown; headers?: Record<string, string> } = {}
+function fakeResponse(): { response: ServerResponse; state: { status?: number; body?: unknown } } {
+  const state: { status?: number; body?: unknown } = {}
   const response = Object.assign(new EventEmitter(), {
     writableEnded: false,
-    writeHead(value: number, headers?: Record<string, string>) {
-      state.status = value
-      if (headers !== undefined) state.headers = headers
-      return this
-    },
+    writeHead(value: number) { state.status = value; return this },
     write() { return true },
     end(this: { writableEnded: boolean }, value?: unknown) {
       if (value !== undefined) state.body = value
@@ -72,7 +68,8 @@ describe('connection node half', () => {
 
   it('registers the /api prefix route and removes it with the fiber', async () => {
     const { routes, dispose } = await mounted()
-    expect(routes).toMatchObject([{ kind: 'prefix', path: API_PATH }])
+    expect(routes).toHaveLength(1)
+    expect(routes[0]).toMatchObject({ kind: 'prefix', path: API_PATH })
     await dispose()
     expect(routes).toHaveLength(0)
   })

+ 0 - 1
packages/client/runtime/src/client/workspaces/service.ts

@@ -239,7 +239,6 @@ export class WorkspacesService implements IWorkspaces {
     }
   }
 
-
   /**
    * Rename a Workspace.
    * @param workspaceId - target workspace.

+ 0 - 1
packages/client/test-runtime/src/workspaces.ts

@@ -98,7 +98,6 @@ export class TestWorkspaces implements IWorkspaces {
     await (this.stubs.get('openPath')?.(path) as Promise<void> | undefined)
   }
 
-
   /**
    * Directory picker (recorded). The default cancels (null); stub to select.
    * @returns the picked path, or null.

+ 1 - 2
packages/client/ui-conversation/src/client/chat/Deliverables.tsx

@@ -2,8 +2,7 @@
 // from the mutation tools' follow-along locations (see turnDeliverables), never
 // from the closing prose, so the answer carries its own output whether or not
 // the model remembered to name it. Clicking one goes through the same openFile
-// the tool rows use — in the browser that is a new tab served from the session
-// workspace, and outside it the Host's own opener.
+// the tool rows use — the Host's own opener, on the Host machine.
 
 import type { ChatViewSlotProps } from '../contract/slots.ts'
 import css from './Deliverables.module.css'