mirror of
https://github.com/sst/opencode.git
synced 2025-08-28 00:44:14 +00:00
Feat: Add Agent Name in the LLM Response Footer (and re-order it) (#1770)
This commit is contained in:
parent
696ab1a752
commit
bd4319f2bc
4 changed files with 81 additions and 31 deletions
|
@ -144,7 +144,15 @@ export function Part(props: PartProps) {
|
|||
DateTime.DATETIME_FULL_WITH_SECONDS,
|
||||
)}
|
||||
>
|
||||
{DateTime.fromMillis(props.message.time.completed).toLocaleString(DateTime.DATETIME_MED)}
|
||||
{DateTime.fromMillis(props.message.time.completed || props.message.time.created).toLocaleString(
|
||||
DateTime.DATETIME_MED,
|
||||
)}
|
||||
{` | ${props.message.modelID}`}
|
||||
{props.message.mode && (
|
||||
<span style={{ "font-weight": "bold", color: "var(--sl-color-accent)" }}>
|
||||
{` | ${props.message.mode}`}
|
||||
</span>
|
||||
)}
|
||||
</Footer>
|
||||
)}
|
||||
</div>
|
||||
|
@ -158,7 +166,17 @@ export function Part(props: PartProps) {
|
|||
{props.part.type === "step-start" && props.message.role === "assistant" && (
|
||||
<div data-component="step-start">
|
||||
<div data-slot="provider">{props.message.providerID}</div>
|
||||
<div data-slot="model">{props.message.modelID}</div>
|
||||
<div data-slot="model">
|
||||
{DateTime.fromMillis(props.message.time.completed || props.message.time.created).toLocaleString(
|
||||
DateTime.DATETIME_MED,
|
||||
)}
|
||||
{` | ${props.message.modelID}`}
|
||||
{props.message.mode && (
|
||||
<span style={{ "font-weight": "bold", color: "var(--sl-color-accent)" }}>
|
||||
{` | ${props.message.mode}`}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{props.part.type === "tool" && props.part.state.status === "error" && (
|
||||
|
@ -653,9 +671,7 @@ function TaskTool(props: ToolProps) {
|
|||
<span data-slot="name">Task</span>
|
||||
<span data-slot="target">{props.state.input.description}</span>
|
||||
</div>
|
||||
<div data-component="tool-input">
|
||||
“{props.state.input.prompt}”
|
||||
</div>
|
||||
<div data-component="tool-input">“{props.state.input.prompt}”</div>
|
||||
<ResultsButton showCopy="Show output" hideCopy="Hide output">
|
||||
<div data-component="tool-output">
|
||||
<ContentMarkdown expand text={props.state.output} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue