Implement a new "Send Filename to Chat" button on the Codebase Details page to enhance collaboration by allowing users to quickly share specific code files within project conversations. This feature aims to streamline discussions about particular files by enabling the direct transfer of filenames to the chat interface.
User Story
As a user,
I want to send the filename of a selected code file directly to the chat page,
so that I can easily reference and discuss specific files with my team without manually typing out filenames.
Features
Button Placement: Place the "Send Filename to Chat" button pinned to the bottom of the component with a light/dark background. If the page is long, the content should scroll under the button.
Functionality:
On button click, retrieve the unique id of the selected file.
Append the content_item_id as a query parameter to the /chat URL (e.g., /chat?content_item_id=12345).
Redirect the user to the chat page with the appended parameter.
On the chat page, detect the content_item_id parameter.
Use the content_item_id to fetch the corresponding contextItem and set the context item's filePath as the selected file in the chat context.
Acceptance Criteria
A "Send Filename to Chat" button is visible at the bottom on the Codebase Details component.
Clicking the button appends the correct content_item_id to the /chat URL and navigates to the chat page.
The chat page recognizes the content_item_id parameter, retrieves the corresponding contextItem, and sets the filePath as the selected file.
The feature is responsive and works seamlessly across supported browsers.
Proper error handling is in place for cases where the content_item_id is invalid or the file does not exist.
Description
Implement a new "Send Filename to Chat" button on the Codebase Details page to enhance collaboration by allowing users to quickly share specific code files within project conversations. This feature aims to streamline discussions about particular files by enabling the direct transfer of filenames to the chat interface.
User Story
As a user, I want to send the filename of a selected code file directly to the chat page, so that I can easily reference and discuss specific files with my team without manually typing out filenames.
Features
id
of the selected file.content_item_id
as a query parameter to the/chat
URL (e.g.,/chat?content_item_id=12345
).content_item_id
parameter.content_item_id
to fetch the correspondingcontextItem
and set the context item's filePath as the selected file in the chat context.Acceptance Criteria
content_item_id
to the/chat
URL and navigates to the chat page.content_item_id
parameter, retrieves the correspondingcontextItem
, and sets the filePath as the selected file.content_item_id
is invalid or the file does not exist.