Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions packages/web-shell/client/components/ChatEditor.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,7 @@
.slashPanel {
position: fixed;
z-index: var(--web-shell-popover-z-index, 1000);
--slash-panel-max-height: min(
calc(
(22px + 10px) + (22px + 10px) + (22px + 10px) + (22px + 10px) + 6px + 12px
),
50vh
);
--slash-panel-max-height: min(calc(12 * (22px + 10px) + 6px + 12px), 40vh);
--slash-anchor-width: 620px;
Comment thread
wenshao marked this conversation as resolved.
Resolved
--slash-command-col: 20ch;
--slash-desc-col: 32ch;
Expand Down Expand Up @@ -262,6 +257,15 @@
background: var(--chat-editor-border-color);
}

.slashSectionHeader {
padding: 4px 8px 2px;
color: var(--muted-foreground);
font-size: 11px;
font-weight: 500;
letter-spacing: 0.02em;
user-select: none;
}

.slashItem {
position: relative;
display: grid;
Expand Down
8 changes: 6 additions & 2 deletions packages/web-shell/client/components/ChatEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,13 +721,17 @@ function SlashCommandPanel({
const section = item.section;
const showSection =
menu.kind === 'command' &&
index > 0 &&
section !== undefined &&
section !== lastSection;
lastSection = section ?? lastSection;
return (
<div key={`${item.id}:${index}`} className={styles.slashEntry}>
{showSection && <div className={styles.slashSection} />}
{showSection && (
<>
{index > 0 && <div className={styles.slashSection} />}
<div className={styles.slashSectionHeader}>{section}</div>
Comment thread
wenshao marked this conversation as resolved.
Resolved
</>
)}
<button
ref={(node) => {
itemRefs.current[index] = node;
Expand Down
Loading