Hi Ayush Mishra,
This is the default behavior of the "Deploy to Web App" template. It's designed to show documents in a side panel for quick review within the app, rather than navigating the user away.
To change this to standard web link behavior. you will need to make a minor code implementation to the frontend of the web app that Azure created for you.
Recommended workaround steps:
1)Even though you deployed with "no-code," all the code is running on your App Service and you have full access to it. The easiest way to edit it is to download it. Download the entire wwwroot folder. This is your web app's code.
Alternatively, you can use the "App Service Editor (Preview)" under "Development Tools" to browse and edit the files directly in your browser, but downloading is safer for a backup.
2)The code for your chat app is based on a standard template. You need to find the specific file that renders the citation links.
- In the code you downloaded, navigate to the frontend folder. This is usually in a subfolder like
frontend or static.
- You are looking for the file that renders the chat message. It's often a JavaScript/TypeScript file, like
Citation.tsx, ChatHistory.tsx, or ChatMessage.js (the exact name may vary slightly).
- Open that file in a code editor (like VS Code or even Notepad).
- Search for the HTML
<a> (anchor) tag that creates the citation link. It will look something like this:
<a onClick={() => handleCitationClick(citation.url)}>
{citation.filename}
</a>
- The key part is the
onClick handler. This is what tells the app to open the side panel.
- You need to replace that code with a standard HTML link that opens in a new tab. Change it to this:
<a href={citation.url} target="_blank" rel="noopener noreferrer">
{citation.filename}
</a>
3)Redeploy Your Changes
After you've saved your file, you need to upload the new version back to your App Service.
- If you used FTP, just re-upload the single file you changed (or the entire
wwwroot folder) back to your App Service, overwriting the old one.
- If you are using the in-browser App Service Editor, just click "Save".
- Your App Service will automatically restart (this may take 30-60 seconds).
Helpful references:
https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/use-web-app
https://github.com/microsoft/sample-app-aoai-chatGPT