mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-10 02:39:56 +00:00
feat(app): follow-up behavior (#17233)
This commit is contained in:
@@ -54,10 +54,6 @@
|
||||
border-color: var(--border-strong-base);
|
||||
}
|
||||
|
||||
&[data-queued] {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
&[data-type="image"] {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
@@ -111,11 +107,6 @@
|
||||
border: 1px solid var(--border-weak-base);
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
&[data-queued] {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
[data-highlight="file"] {
|
||||
color: var(--syntax-property);
|
||||
@@ -128,14 +119,6 @@
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
[data-slot="user-message-queued-indicator"] {
|
||||
margin-top: 6px;
|
||||
margin-right: 2px;
|
||||
font-size: var(--font-size-small);
|
||||
color: var(--text-weak);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
[data-slot="user-message-copy-wrapper"] {
|
||||
min-height: 24px;
|
||||
margin-top: 4px;
|
||||
|
||||
@@ -132,7 +132,6 @@ export interface MessageProps {
|
||||
actions?: UserActions
|
||||
showAssistantCopyPartID?: string | null
|
||||
interrupted?: boolean
|
||||
queued?: boolean
|
||||
showReasoningSummaries?: boolean
|
||||
}
|
||||
|
||||
@@ -686,7 +685,6 @@ export function Message(props: MessageProps) {
|
||||
parts={props.parts}
|
||||
actions={props.actions}
|
||||
interrupted={props.interrupted}
|
||||
queued={props.queued}
|
||||
/>
|
||||
)}
|
||||
</Match>
|
||||
@@ -883,7 +881,6 @@ export function UserMessageDisplay(props: {
|
||||
parts: PartType[]
|
||||
actions?: UserActions
|
||||
interrupted?: boolean
|
||||
queued?: boolean
|
||||
}) {
|
||||
const data = useData()
|
||||
const dialog = useDialog()
|
||||
@@ -981,7 +978,6 @@ export function UserMessageDisplay(props: {
|
||||
<div
|
||||
data-slot="user-message-attachment"
|
||||
data-type={file.mime.startsWith("image/") ? "image" : "file"}
|
||||
data-queued={props.queued ? "" : undefined}
|
||||
onClick={() => {
|
||||
if (file.mime.startsWith("image/") && file.url) {
|
||||
openImagePreview(file.url, file.filename)
|
||||
@@ -1010,14 +1006,9 @@ export function UserMessageDisplay(props: {
|
||||
<Show when={text()}>
|
||||
<>
|
||||
<div data-slot="user-message-body">
|
||||
<div data-slot="user-message-text" data-queued={props.queued ? "" : undefined}>
|
||||
<div data-slot="user-message-text">
|
||||
<HighlightedText text={text()} references={inlineFiles()} agents={agents()} />
|
||||
</div>
|
||||
<Show when={props.queued}>
|
||||
<div data-slot="user-message-queued-indicator">
|
||||
<TextShimmer text={i18n.t("ui.message.queued")} />
|
||||
</div>
|
||||
</Show>
|
||||
</div>
|
||||
<div data-slot="user-message-copy-wrapper" data-interrupted={props.interrupted ? "" : undefined}>
|
||||
<Show when={metaHead() || metaTail()}>
|
||||
|
||||
@@ -146,7 +146,6 @@ export function SessionTurn(
|
||||
shellToolDefaultOpen?: boolean
|
||||
editToolDefaultOpen?: boolean
|
||||
active?: boolean
|
||||
queued?: boolean
|
||||
status?: SessionStatus
|
||||
onUserInteracted?: () => void
|
||||
classes?: {
|
||||
@@ -193,7 +192,7 @@ export function SessionTurn(
|
||||
})
|
||||
|
||||
const pending = createMemo(() => {
|
||||
if (typeof props.active === "boolean" && typeof props.queued === "boolean") return
|
||||
if (typeof props.active === "boolean") return
|
||||
const messages = allMessages() ?? emptyMessages
|
||||
return messages.findLast(
|
||||
(item): item is AssistantMessage => item.role === "assistant" && typeof item.time.completed !== "number",
|
||||
@@ -218,16 +217,6 @@ export function SessionTurn(
|
||||
return parent.id === msg.id
|
||||
})
|
||||
|
||||
const queued = createMemo(() => {
|
||||
if (typeof props.queued === "boolean") return props.queued
|
||||
const id = message()?.id
|
||||
if (!id) return false
|
||||
if (!pendingUser()) return false
|
||||
const item = pending()
|
||||
if (!item) return false
|
||||
return id > item.id
|
||||
})
|
||||
|
||||
const parts = createMemo(() => {
|
||||
const msg = message()
|
||||
if (!msg) return emptyParts
|
||||
@@ -367,7 +356,6 @@ export function SessionTurn(
|
||||
)
|
||||
const showThinking = createMemo(() => {
|
||||
if (!working() || !!error()) return false
|
||||
if (queued()) return false
|
||||
if (status().type === "retry") return false
|
||||
if (showReasoningSummaries()) return assistantVisible() === 0
|
||||
return true
|
||||
@@ -396,13 +384,7 @@ export function SessionTurn(
|
||||
class={props.classes?.container}
|
||||
>
|
||||
<div data-slot="session-turn-message-content" aria-live="off">
|
||||
<Message
|
||||
message={message()!}
|
||||
parts={parts()}
|
||||
actions={props.actions}
|
||||
interrupted={interrupted()}
|
||||
queued={queued()}
|
||||
/>
|
||||
<Message message={message()!} parts={parts()} actions={props.actions} interrupted={interrupted()} />
|
||||
</div>
|
||||
<Show when={compaction()}>
|
||||
<div data-slot="session-turn-compaction">
|
||||
|
||||
Reference in New Issue
Block a user