diff --git a/frontend/src/components/message/MessagePart.tsx b/frontend/src/components/message/MessagePart.tsx
index d4123545..f1d77fac 100644
--- a/frontend/src/components/message/MessagePart.tsx
+++ b/frontend/src/components/message/MessagePart.tsx
@@ -1,11 +1,13 @@
import { memo } from 'react'
import type { components } from '@/api/opencode-types'
-import { Volume2, Square, Loader2 } from 'lucide-react'
+import { Volume2, Loader2 } from 'lucide-react'
import { TextPart } from './TextPart'
+import { SquareFill } from '@/components/ui/square-fill'
import { PatchPart } from './PatchPart'
import { ToolCallPart } from './ToolCallPart'
import { RetryPart } from './RetryPart'
import { useTTS } from '@/hooks/useTTS'
+import { useMobile } from '@/hooks/useMobile'
import { CopyButton } from '@/components/ui/copy-button'
type RetryPartType = components['schemas']['RetryPart']
@@ -91,7 +93,7 @@ export function TTSButton({ content, className = "" }: TTSButtonProps) {
{isLoading && isThisPlaying ? (
) : isThisPlaying ? (
-
+
) : (
)}
@@ -103,6 +105,7 @@ export function TTSButton({ content, className = "" }: TTSButtonProps) {
export const MessagePart = memo(function MessagePart({ part, role, allParts, partIndex, onFileClick, onChildSessionClick, messageTextContent }: MessagePartProps) {
const copyableContent = getCopyableContent(part, allParts)
+ const isMobile = useMobile()
switch (part.type) {
case 'text':
@@ -140,14 +143,17 @@ export const MessagePart = memo(function MessagePart({ part, role, allParts, par
Agent: {part.name}
)
- case 'step-finish':
+ case 'step-finish': {
+ const isFree = part.cost === 0
+ const costText = isMobile && isFree ? null : ${part.cost.toFixed(4)} • {part.tokens.input + part.tokens.output} tokens
return (
- ${part.cost.toFixed(4)} • {part.tokens.input + part.tokens.output} tokens
+ {costText}
{messageTextContent && }
)
+ }
case 'file':
return (
diff --git a/frontend/src/components/message/PromptInput.tsx b/frontend/src/components/message/PromptInput.tsx
index 1c2f8326..2d3b72a2 100644
--- a/frontend/src/components/message/PromptInput.tsx
+++ b/frontend/src/components/message/PromptInput.tsx
@@ -10,9 +10,10 @@ import { useUserBash } from '@/stores/userBashStore'
import { useMobile } from '@/hooks/useMobile'
import { useSessionStatusForSession } from '@/stores/sessionStatusStore'
import { usePermissionContext } from '@/contexts/PermissionContext'
-import { ChevronDown, Square, Upload, X } from 'lucide-react'
+import { ChevronDown, Upload, X } from 'lucide-react'
import { CommandSuggestions } from '@/components/command/CommandSuggestions'
+import { SquareFill } from '@/components/ui/square-fill'
import { MentionSuggestions, type MentionItem } from './MentionSuggestions'
import { SessionStatusIndicator } from '@/components/ui/session-status-indicator'
import { detectMentionTrigger, parsePromptToParts, getFilename, filterAgentsByQuery } from '@/lib/promptParser'
@@ -600,10 +601,10 @@ return (
)}
@@ -693,7 +694,7 @@ return (
className="hidden md:block p-1.5 px-5 md:p-2 md:px-6 rounded-lg transition-all duration-200 active:scale-95 hover:scale-105 bg-gradient-to-br from-red-600 to-red-700 hover:from-red-500 hover:to-red-600 text-destructive-foreground border border-red-500/60 hover:border-red-400 shadow-md shadow-red-500/30 hover:shadow-red-500/40 ring-1 ring-red-500/20 hover:ring-red-500/30"
title="Stop"
>
-
+
)}
{children}
+ },
+ table({ children }) {
+ return (
+
+ )
}
}}
>
diff --git a/frontend/src/components/settings/TTSSettings.tsx b/frontend/src/components/settings/TTSSettings.tsx
index 2e73c1ab..6ef17706 100644
--- a/frontend/src/components/settings/TTSSettings.tsx
+++ b/frontend/src/components/settings/TTSSettings.tsx
@@ -6,8 +6,9 @@ import { useSettings } from '@/hooks/useSettings'
import { useTTS } from '@/hooks/useTTS'
import { useTTSModels, useTTSVoices, useTTSDiscovery } from '@/hooks/useTTSDiscovery'
import { getAvailableVoiceNames, isWebSpeechSupported } from '@/lib/webSpeechSynthesizer'
-import { Loader2, Volume2, Square, XCircle, RefreshCw, MonitorSpeaker, Globe, CheckCircle2 } from 'lucide-react'
+import { Loader2, Volume2, XCircle, RefreshCw, MonitorSpeaker, Globe, CheckCircle2 } from 'lucide-react'
import { Button } from '@/components/ui/button'
+import { SquareFill } from '@/components/ui/square-fill'
import { Input } from '@/components/ui/input'
import { Switch } from '@/components/ui/switch'
import { Slider } from '@/components/ui/slider'
@@ -642,7 +643,7 @@ export function TTSSettings() {
>
) : isPlaying ? (
<>
-
+
Stop
>
) : (
diff --git a/frontend/src/components/ui/square-fill.tsx b/frontend/src/components/ui/square-fill.tsx
new file mode 100644
index 00000000..e855faf3
--- /dev/null
+++ b/frontend/src/components/ui/square-fill.tsx
@@ -0,0 +1,12 @@
+export function SquareFill({ className = "" }: { className?: string }) {
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/frontend/src/index.css b/frontend/src/index.css
index aa3e0617..f188f615 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -225,6 +225,35 @@ body {
word-break: break-all;
}
+.prose-enhanced .table-wrapper {
+ overflow-x: auto;
+ margin: 1em 0;
+ -webkit-overflow-scrolling: touch;
+}
+
+.prose-enhanced table {
+ border-collapse: collapse;
+ min-width: 100%;
+ font-size: 0.875rem;
+}
+
+.prose-enhanced th,
+.prose-enhanced td {
+ padding: 0.5rem 0.75rem;
+ border: 1px solid var(--color-border);
+ text-align: left;
+ white-space: nowrap;
+}
+
+.prose-enhanced th {
+ background-color: var(--color-accent);
+ font-weight: 600;
+}
+
+.prose-enhanced tr:nth-child(even) {
+ background-color: var(--color-accent);
+}
+
@media (max-width: 640px) {
.prose-enhanced pre {
padding: 0.5rem;
@@ -234,6 +263,12 @@ body {
.prose-enhanced code {
font-size: 0.75rem;
}
+
+ .prose-enhanced th,
+ .prose-enhanced td {
+ padding: 0.375rem 0.5rem;
+ font-size: 0.75rem;
+ }
}
.prose-enhanced :first-child {