Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@Powerpages Copilot] Context Improvement for Webpage #1016

Merged

Conversation

amitjoshi438
Copy link
Contributor

This pull request introduces several enhancements to the PowerPagesChatParticipant class and related utilities, focusing on managing and fetching related files for a given context. The most important changes include adding support for fetching related files based on the active file's context, updating schemas for file extensions, and modifying API requests to include related files.

Enhancements to file management:

  • src/common/utilities/Utils.ts: Added functions getFileContent, getFileContentByType, and fetchRelatedFiles to manage and fetch related files based on the active file's context.

Schema updates:

  • src/common/constants.ts: Defined componentTypeSchema and relatedFilesSchema to map file types and their extensions, and added an interface IRelatedFiles for related files.

API request modifications:

Class updates:

Minor updates:

  • src/common/copilot/constants.ts: Added css to the FieldTypeMap.
  • Removed an extraneous line in src/common/chat-participants/powerpages/PowerPagesChatParticipantUtils.ts.

@amitjoshi438 amitjoshi438 requested review from a team as code owners August 14, 2024 09:39
src/common/constants.ts Show resolved Hide resolved
src/common/utilities/Utils.ts Show resolved Hide resolved
src/common/utilities/Utils.ts Show resolved Hide resolved
src/common/utilities/Utils.ts Show resolved Hide resolved
@amitjoshi438 amitjoshi438 merged commit daffb67 into main Aug 20, 2024
6 checks passed
@amitjoshi438 amitjoshi438 deleted the user/amitjoshi/@powerpagesWebpageContextImprovement branch August 20, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants