mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 10:14:22 +01:00
docs: add copy button to user messages too (#2285)
This commit is contained in:
@@ -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"] {
|
||||
|
||||
Reference in New Issue
Block a user