docs: add copy button to user messages too (#2285)

This commit is contained in:
Aiden Cline
2025-08-27 18:14:27 -05:00
committed by GitHub
parent ad8ea82611
commit 87cf08a9e7
4 changed files with 9 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import style from "./content-text.module.css"
import { createSignal } from "solid-js"
import { createOverflow } from "./common"
import { CopyButton } from "./copy-button"
interface Props {
text: string
@@ -30,6 +31,7 @@ export function ContentText(props: Props) {
{expanded() ? "Show less" : "Show more"}
</button>
)}
<CopyButton text={props.text} />
</div>
)
}

View File

@@ -9,7 +9,6 @@
background: none;
border: none;
padding: 0.125rem;
background-color: var(--sl-color-bg);
color: var(--sl-color-text-secondary);
svg {

View File

@@ -126,6 +126,12 @@
gap: 1rem;
flex-grow: 1;
max-width: var(--md-tool-width);
position: relative;
[data-component="copy-button"] {
top: 0.5rem;
right: calc(0.5rem - 1px);
}
}
[data-component="assistant-reasoning"] {