Skip to content

Commit c69abee

Browse files
chore: generate
1 parent dc3ff4b commit c69abee

4 files changed

Lines changed: 27 additions & 40 deletions

File tree

‎packages/app/src/components/command-palette.ts‎

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -249,30 +249,30 @@ export function createServerSessionEntries(props: {
249249
})
250250
if (current.signal.aborted) return []
251251
const opened = props.opened()
252-
const openedByID = new Map(
253-
opened.flatMap((project) => (project.id ? [[project.id, project] as const] : [])),
254-
)
252+
const openedByID = new Map(opened.flatMap((project) => (project.id ? [[project.id, project] as const] : [])))
255253
const stored = props.stored().map((project) => ({ ...project, expanded: false }))
256254
const storedByID = new Map(stored.map((project) => [project.id, project] as const))
257255
return props
258256
.load(search, current.signal)
259257
.then((result) =>
260-
(result.data ?? []).filter((session) => !session.time.archived).map((session) => {
261-
const project =
262-
projectForSession(session, opened, openedByID) ?? projectForSession(session, stored, storedByID)
263-
return {
264-
id: `session:${props.server}:${session.id}`,
265-
type: "session" as const,
266-
title: session.title || props.untitled(),
267-
description: project ? displayName(project) : session.project?.name || getFilename(session.directory),
268-
category: props.category(),
269-
directory: session.directory,
270-
sessionID: session.id,
271-
server: props.server,
272-
project,
273-
updated: session.time.updated,
274-
}
275-
}),
258+
(result.data ?? [])
259+
.filter((session) => !session.time.archived)
260+
.map((session) => {
261+
const project =
262+
projectForSession(session, opened, openedByID) ?? projectForSession(session, stored, storedByID)
263+
return {
264+
id: `session:${props.server}:${session.id}`,
265+
type: "session" as const,
266+
title: session.title || props.untitled(),
267+
description: project ? displayName(project) : session.project?.name || getFilename(session.directory),
268+
category: props.category(),
269+
directory: session.directory,
270+
sessionID: session.id,
271+
server: props.server,
272+
project,
273+
updated: session.time.updated,
274+
}
275+
}),
276276
)
277277
.catch(() => [] as CommandPaletteEntry[])
278278
}

‎packages/app/src/components/dialog-command-palette-v2.tsx‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ export function DialogHomeCommandPaletteV2(props: {
7373
const state = { cleanup: undefined as (() => void) | void, committed: false }
7474
const commandEntries = createMemo(() => {
7575
const category = language.t("palette.group.commands")
76-
return commandPaletteOptions(command.options).map((option) =>
77-
createCommandPaletteCommandEntry(option, category),
78-
)
76+
return commandPaletteOptions(command.options).map((option) => createCommandPaletteCommandEntry(option, category))
7977
})
8078
const sessions = createServerSessionEntries({
8179
server: ServerConnection.key(props.server),
@@ -107,10 +105,7 @@ export function DialogHomeCommandPaletteV2(props: {
107105
const loadItems = async (text: string) => {
108106
const query = text.trim()
109107
if (!query) return commandEntries().slice(0, 5)
110-
return [
111-
...commandEntries().filter((entry) => matchesEntry(entry, query)),
112-
...(await sessions(query)),
113-
]
108+
return [...commandEntries().filter((entry) => matchesEntry(entry, query)), ...(await sessions(query))]
114109
}
115110

116111
onCleanup(() => {
@@ -147,12 +142,7 @@ function CommandPaletteView(props: {
147142
const groupedEntries = createMemo(() => groups(visibleEntries()))
148143
const activeEntry = createMemo(() => visibleEntries()[active()])
149144
const openSessions = createMemo(
150-
() =>
151-
new Set(
152-
tabs.store.flatMap((tab) =>
153-
tab.type === "session" ? [`${tab.server}\0${tab.sessionId}`] : [],
154-
),
155-
),
145+
() => new Set(tabs.store.flatMap((tab) => (tab.type === "session" ? [`${tab.server}\0${tab.sessionId}`] : []))),
156146
)
157147

158148
createEffect(() => {

‎packages/app/src/context/command.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ export interface CommandOption {
9090
export function commandPaletteOptions(options: CommandOption[]) {
9191
return options.filter(
9292
(option) =>
93-
!option.disabled &&
94-
!option.hidden &&
95-
!option.id.startsWith(SUGGESTED_PREFIX) &&
96-
option.id !== "file.open",
93+
!option.disabled && !option.hidden && !option.id.startsWith(SUGGESTED_PREFIX) && option.id !== "file.open",
9794
)
9895
}
9996

‎packages/ui/src/components/scroll-view.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ export type ScrollViewThumbVisibility = "hover" | "scroll"
1919
export interface ScrollViewProps extends ComponentProps<"div"> {
2020
viewportRef?: (el: HTMLDivElement) => void
2121
orientation?: "vertical" | "horizontal" // currently only vertical is fully implemented for thumb
22-
/**
23-
* `hover`: show while hovered or scrolling. `scroll`: show only while scrolling.
24-
*
25-
* In most cases, scrolling a container = hovering over it, so this change has no effect.
22+
/**
23+
* `hover`: show while hovered or scrolling. `scroll`: show only while scrolling.
24+
*
25+
* In most cases, scrolling a container = hovering over it, so this change has no effect.
2626
* This is a special case to account for the home page scroll, where scrolling a container != hovering over it
2727
* */
2828
thumbVisibility?: ScrollViewThumbVisibility

0 commit comments

Comments
 (0)