diff --git a/src/components/UserMessage.integration.test.tsx b/src/components/UserMessage.integration.test.tsx
index 5665ee4e..38747b24 100644
--- a/src/components/UserMessage.integration.test.tsx
+++ b/src/components/UserMessage.integration.test.tsx
@@ -19,7 +19,8 @@ describe('UserMessage Integration', () => {
// Check that file attachment is rendered as a badge
expect(screen.getByText('data.csv')).toBeInTheDocument();
- expect(screen.getByText('/tmp/data.csv')).toBeInTheDocument();
+ // Full path should not be displayed
+ expect(screen.queryByText('/tmp/data.csv')).not.toBeInTheDocument();
});
it('handles single text part with file attachment', () => {
@@ -30,7 +31,8 @@ describe('UserMessage Integration', () => {
render();
expect(screen.getByText('script.js')).toBeInTheDocument();
- expect(screen.getByText('/tmp/script.js')).toBeInTheDocument();
+ // Full path should not be displayed
+ expect(screen.queryByText('/tmp/script.js')).not.toBeInTheDocument();
});
it('handles multiple file attachments in separate parts', () => {
diff --git a/src/components/UserMessage.test.tsx b/src/components/UserMessage.test.tsx
index 3b63e0a4..c27ec8f6 100644
--- a/src/components/UserMessage.test.tsx
+++ b/src/components/UserMessage.test.tsx
@@ -30,7 +30,8 @@ describe('UserMessage', () => {
expect(screen.getByText('Here is my file:')).toBeInTheDocument();
expect(screen.getByText('test.txt')).toBeInTheDocument();
- expect(screen.getByText('/tmp/test.txt')).toBeInTheDocument();
+ // Full path should not be displayed
+ expect(screen.queryByText('/tmp/test.txt')).not.toBeInTheDocument();
});
it('renders multiple file attachments with text parts', () => {
@@ -64,7 +65,8 @@ describe('UserMessage', () => {
render();
expect(screen.getByText('README')).toBeInTheDocument();
- expect(screen.getByText('/tmp/README')).toBeInTheDocument();
+ // Full path should not be displayed
+ expect(screen.queryByText('/tmp/README')).not.toBeInTheDocument();
});
it('handles complex filenames with underscores and numbers', () => {
@@ -73,7 +75,8 @@ describe('UserMessage', () => {
render();
expect(screen.getByText('my_file_1.txt')).toBeInTheDocument();
- expect(screen.getByText('/tmp/my_file_1.txt')).toBeInTheDocument();
+ // Full path should not be displayed
+ expect(screen.queryByText('/tmp/my_file_1.txt')).not.toBeInTheDocument();
});
it('preserves whitespace in text content', () => {
diff --git a/src/components/UserMessage.tsx b/src/components/UserMessage.tsx
index 533a9697..56285baf 100644
--- a/src/components/UserMessage.tsx
+++ b/src/components/UserMessage.tsx
@@ -75,7 +75,6 @@ export function UserMessage({ content }: UserMessageProps) {
{getFileIcon(filename)}
{filename}
- {part.filepath}
);