orynacode-ai 1.16.21 → 1.16.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.16.21",
3
+ "version": "1.16.23",
4
4
  "name": "orynacode-ai",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,6 +34,7 @@ export const TuiPublishPayload = Schema.Union([
34
34
  ])
35
35
 
36
36
  export const TuiPaths = {
37
+ home: `${root}/home`,
37
38
  appendPrompt: `${root}/append-prompt`,
38
39
  openHelp: `${root}/open-help`,
39
40
  openSessions: `${root}/open-sessions`,
@@ -53,6 +54,16 @@ export const TuiApi = HttpApi.make("tui")
53
54
  .add(
54
55
  HttpApiGroup.make("tui")
55
56
  .add(
57
+ HttpApiEndpoint.post("navigateHome", TuiPaths.home, {
58
+ query: WorkspaceRoutingQuery,
59
+ success: described(Schema.Boolean, "Navigated to home"),
60
+ }).annotateMerge(
61
+ OpenApi.annotations({
62
+ identifier: "tui.navigateHome",
63
+ summary: "Navigate to home",
64
+ description: "Navigate the TUI to the home page.",
65
+ }),
66
+ ),
56
67
  HttpApiEndpoint.post("appendPrompt", TuiPaths.appendPrompt, {
57
68
  query: WorkspaceRoutingQuery,
58
69
  payload: TuiEvent.PromptAppend.data,
@@ -1,6 +1,6 @@
1
1
  import { PermissionV1 } from "@opencode-ai/core/v1/permission"
2
2
  import { Agent } from "@/agent/agent"
3
- import { GlobalBus } from "@/bus/global"
3
+ import { TuiEvent } from "@/server/tui-event"
4
4
  import { SessionV1 } from "@opencode-ai/core/v1/session"
5
5
  import { EventV2Bridge } from "@/event-v2-bridge"
6
6
  import { Command } from "@/command"
@@ -414,16 +414,8 @@ export const sessionHandlers = HttpApiBuilder.group(InstanceHttpApi, "session",
414
414
  const focus = Effect.fn("SessionHttpApi.focus")(function* (ctx: {
415
415
  params: { sessionID: SessionID }
416
416
  }) {
417
- const info = yield* requireSession(ctx.params.sessionID)
418
- yield* Effect.sync(() => {
419
- GlobalBus.emit("event", {
420
- directory: info.directory,
421
- payload: {
422
- type: "tui.session.select",
423
- properties: { sessionID: ctx.params.sessionID },
424
- },
425
- })
426
- })
417
+ yield* requireSession(ctx.params.sessionID)
418
+ yield* events.publish(TuiEvent.SessionSelect, { sessionID: ctx.params.sessionID })
427
419
  return true
428
420
  })
429
421
 
@@ -113,7 +113,13 @@ export const tuiHandlers = HttpApiBuilder.group(InstanceHttpApi, "tui", (handler
113
113
  return true
114
114
  })
115
115
 
116
+ const navigateHome = Effect.fn("TuiHttpApi.navigateHome")(function* () {
117
+ yield* publishCommand("session.new")
118
+ return true
119
+ })
120
+
116
121
  return handlers
122
+ .handle("navigateHome", navigateHome)
117
123
  .handle("appendPrompt", appendPrompt)
118
124
  .handle("openHelp", openHelp)
119
125
  .handle("openSessions", openSessions)