Fix initial context for Cody Web on the repository page (#63497)

Closes
https://linear.app/sourcegraph/issue/SRCH-620/cody-web-has-incorrect-initial-context-on-blank-repository-page

## Test plan
- Go to the repository root and open Cody Web, it should have only
repository as the initial context
This commit is contained in:
Vova Kulikov 2024-06-26 16:50:25 -03:00 committed by GitHub
parent ea9c45df8f
commit 26c872cb77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,7 +35,7 @@ export const NewCodySidebarWebChat: FC<NewCodySidebarWebChatProps> = memo(functi
const contextInfo = useMemo(
() => ({
repositories: [repository],
fileURL: `/${filePath}`,
fileURL: filePath ? `/${filePath}` : undefined,
}),
[repository, filePath]
)