mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 16:02:19 +00:00
docs: add copy button to user messages too (#2285)
This commit is contained in:
parent
ad8ea82611
commit
87cf08a9e7
4 changed files with 9 additions and 4 deletions
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
background: none;
|
||||
border: none;
|
||||
padding: 0.125rem;
|
||||
background-color: var(--sl-color-bg);
|
||||
color: var(--sl-color-text-secondary);
|
||||
|
||||
svg {
|
||||
|
|
|
|||
|
|
@ -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"] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue