Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ export function ForwardMessageDialog({
}

// Truncate message content for display
const truncateContent = (content: string, maxLength: number = 80) => {
const truncateContent = (content: string | undefined, maxLength: number = 80) => {
if (!content) return ''
// Remove markdown prefix if present
let text = content
if (text.startsWith('${$$}$')) {
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/features/inbox/components/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,11 @@ export function MessageList({
if (!snapshot || snapshot.length === 0) return ''
// Get the last user message
const lastUserMessage = [...snapshot].reverse().find(m => m.role === 'USER')
if (lastUserMessage) {
if (lastUserMessage && lastUserMessage.content) {
return lastUserMessage.content.substring(0, 200)
}
return snapshot[0].content.substring(0, 200)
const firstContent = snapshot[0]?.content
return firstContent ? firstContent.substring(0, 200) : ''
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export function GeminiAnnotations({ annotations, className = '' }: GeminiAnnotat
}

// Extract domain from URL for display
const getDomain = (url: string): string => {
const getDomain = (url: string | undefined): string => {
if (!url) return ''
try {
const urlObj = new URL(url)
return urlObj.hostname.replace('www.', '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ function MessagesArea({
.filter(msg => msg.status === 'completed') // Only export completed messages
.map(msg => {
// Remove markdown prefix from AI messages if present
let content = msg.content
let content = msg.content || ''
if (msg.type === 'ai' && content.startsWith('${$$}$')) {
content = content.substring(6)
}
Expand Down Expand Up @@ -1103,7 +1103,7 @@ function MessagesArea({
.filter(msg => msg.subtaskId && msg.status === 'completed')
.map(msg => {
// Remove markdown prefix from AI messages if present
let content = msg.content
let content = msg.content || ''
if (msg.type === 'ai' && content.startsWith('${$$}$')) {
content = content.substring(6)
}
Expand Down
Loading