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 — fix(server): skip host lookup when device tools omit it · pingdotgg/t3code@2a4e795

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/mcp
    • McpHttpServer.test.ts
    • toolkits/device
      • handlers.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/mcp/McpHttpServer.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/mcp/McpHttpServer.test.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const callSnapshot = (args: Record<string, unknown>) => callTool("preview_snapsh
146146
it.effect.each([
147147
{ input: {}, open: false, message: "No device is open in this thread. Call device_open first." },
148148
{
149-
input: { deviceId: "missing", hostId: "local" },
149+
input: { deviceId: "missing" },
150150
open: false,
151151
message: "Device missing is not open in this thread. Call device_open first.",
152152
},
Collapse file

‎apps/server/src/mcp/toolkits/device/handlers.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/mcp/toolkits/device/handlers.ts
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,10 @@ const handlers = {
297297
const scope = yield* requireDeviceAccess;
298298
const devices = yield* DeviceService.DeviceService;
299299
const threadId = scope.thread.threadId;
300-
const hostId = yield* resolveHostId((yield* devices.state).hosts, input.hostId);
300+
const hostId =
301+
input.hostId === undefined
302+
? undefined
303+
: yield* resolveHostId((yield* devices.state).hosts, input.hostId);
301304
const target =
302305
input.deviceId === undefined
303306
? (yield* devices.sessionsForThread(threadId)).findLast(
@@ -332,7 +335,10 @@ const handlers = {
332335
const scope = yield* requireDeviceAccess;
333336
const devices = yield* DeviceService.DeviceService;
334337
const deviceId = input.deviceId;
335-
const inputHostId = yield* resolveHostId((yield* devices.state).hosts, input.hostId);
338+
const inputHostId =
339+
input.hostId === undefined
340+
? undefined
341+
: yield* resolveHostId((yield* devices.state).hosts, input.hostId);
336342
const open =
337343
deviceId === undefined
338344
? Option.none()

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.