Skip to content

Commit eda8565

Browse files
Apply PR #37102: feat(session-ui): add v2 prompt input and timeline components
2 parents d83c71c + e7aa727 commit eda8565

32 files changed

Lines changed: 3273 additions & 236 deletions

bun.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/app/e2e/regression/prompt-thinking-level.spec.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,15 @@ test("shows the V2 thinking level control while relevant", async ({ page }) => {
5454
})
5555

5656
await page.goto(`/${base64Encode(directory)}/session/${sessionID}`)
57-
const composer = page.locator('[data-component="session-composer"]')
57+
const composer = page.locator('[data-component="prompt-input-v2"]')
5858
const input = composer.locator('[data-component="prompt-input"]')
59-
const control = composer.locator('[data-component="prompt-variant-control"]')
59+
const control = composer.locator('button[title="Choose model variant"]')
6060
await expectAppVisible(composer)
6161

6262
await idleComposer(page)
63-
await expect(control).toBeHidden()
64-
65-
await composer.hover()
6663
await expect(control).toBeVisible()
6764

68-
await control.locator('[data-action="prompt-model-variant"]').click()
65+
await control.click()
6966
const high = page.getByRole("menuitemradio", { name: "high" })
7067
await expect(high).toBeVisible()
7168
await page.mouse.move(0, 0)

packages/app/e2e/smoke/session-timeline.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,5 +736,5 @@ async function switchTitlebarSession(page: Page, sessionID: string, title: strin
736736
}
737737

738738
async function expectSessionReady(page: Page) {
739-
await expectAppVisible(page.getByRole("textbox", { name: /Ask anything/i }))
739+
await expectAppVisible(page.getByRole("textbox", { name: "Prompt" }))
740740
}

packages/app/src/app.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ import { Font } from "@opencode-ai/ui/font"
99
import { Splash } from "@opencode-ai/ui/logo"
1010
import { ThemeProvider } from "@opencode-ai/ui/theme/context"
1111
import { MetaProvider } from "@solidjs/meta"
12-
import { type BaseRouterProps, Navigate, Route, Router, useNavigate, useParams, useSearchParams } from "@solidjs/router"
12+
import {
13+
type BaseRouterProps,
14+
Navigate,
15+
Route,
16+
Router,
17+
useLocation,
18+
useNavigate,
19+
useParams,
20+
useSearchParams,
21+
} from "@solidjs/router"
1322
import { QueryClient, QueryClientProvider } from "@tanstack/solid-query"
1423
import { Effect } from "effect"
1524
import { base64Encode } from "@opencode-ai/core/util/encode"
@@ -29,6 +38,7 @@ import {
2938
Show,
3039
} from "solid-js"
3140
import { Dynamic } from "solid-js/web"
41+
import { makeEventListener } from "@solid-primitives/event-listener"
3242
import { CommandProvider, useCommand, type CommandOption } from "@/context/command"
3343
import { CommentsProvider } from "@/context/comments"
3444
import { FileProvider } from "@/context/file"

0 commit comments

Comments
 (0)