forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding Yep Chat in Taktak #1
Draft
nyinyithann
wants to merge
70
commits into
tt/develop
Choose a base branch
from
tt/feature/yepchat
base: tt/develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces a toolbar button that allows users to toggle the visibility of the chat side panel. The button provides a visual cue by highlighting with a rounded background when the chat panel is active.
…nel can be toggled from the toolbar and displays AI chat alongside current web content.
…so it can be localized into different languages.
…m to WebUI layer in progress)
… suitable for conversations
…g & error handling)
… pipe issue needs to be fixed though)
…sults in the debug console
Deleted ChatContextObserver class and its dependencies to simplify codebase. Adjusted related headers and implementation files to reflect the removal, and corrected remaining references and comments accordingly.
Implemented different prompts for chat actions: summarize page, explain page, and fact check page. Updated function signatures and button click handlers to utilize the new action-specific prompts.
Previously, the full content was passed to the query without length restriction, which could cause issues. Now, the content is truncated to a maximum of 32768 tokens to ensure it adheres to the defined limit.
Included the 'marked' package in the package
Included the 'marked' package in the package
Introduces the third-party Marked library to the project, including its build file, source code, and license information. The library provides a Markdown parser and is integrated into the build system for resource generation.
Integrated the marked library into the side-panel chat application for rendering Markdown. Updated relevant build files and TypeScript configurations to include the marked library and its definitions. Introduced a helper `getTrustedHTML` in `parse_html_subset.ts` and used `marked.parse` in `chat_app.ts` to parse responses to Markdown.
Integrated the marked library into the side-panel chat application for rendering Markdown. Updated relevant build files and TypeScript configurations to include the marked library and its definitions. Introduced a helper `getTrustedHTML` in `parse_html_subset.ts` and used `marked.parse` in `chat_app.ts` to parse responses to Markdown.
Updated chat message rendering to use `marked` library for Markdown parsing. Ensured safe HTML rendering using `getTrustedHTML` and replaced manual text handling with parsed Markdown output.
Replaced `div` elements with semantic `article` tags for better accessibility. Updated scroll behavior and appearance for smoother UX, adjusted padding and layout for consistency, and refined CSS rules to optimize styling across components. Improved scrollbar theming for a more modern look.
…ely effects in converting markdown to html
Refactored CSS styles for better alignment and consistency, including border addition and adjustments to line-height and H2 styling. TypeScript changes include exporting `conversationRecord` type, adding debug logging, and refactoring response handling with a new utility function in the HTML template for cleaner, reusable code.
Added a comment to properly credit the third-party/marked library, adhering to Chromium's recommended practices. This ensures compliance with attribution guidelines for third-party code.
Refined textarea height management to handle up to 10 lines dynamically, ensuring better usability by avoiding unnecessary scrollbars. Updated chat markdown lists with reduced padding and consistent list item spacing. Added custom scrollbar styling for improved visual consistency.
Added `disabled` states for UI elements like the input field and send button to prevent interactions during query submission or when input is invalid. Enhanced visual feedback through styles such as cursor change and reduced opacity for disabled elements. Fixed button behavior to avoid submitting empty queries.
Introduced support for passing parameters to chat actions, enabling more dynamic prompts for translation and social media. Added dropdown menus for selecting translation languages and social media platforms. Fixed a typo in the fact-check prompt and improved overall UI structure for better functionality.
Renamed variables for better readability and consistency, such as replacing `translateToSubItems_` with `translateToLanguages_`. Refactored social media post handling to use a unified `action-menu` component with event-driven logic. Added support for additional languages and cleaned up redundant menu elements.
The CSS and HTML structures for query prompts were refactored for better modularity and maintainability. Introduced `getQueryPromptSection` for improved query rendering and added a `resetToAutoHeight` method to streamline input field resizing. Removed unused imports and simplified the codebase for clarity, addressing minor issues in text handling and logging.
Introduced new color IDs and updated styling for the chat send button, providing improved visuals in both light and dark modes. Refactored CSS and HTML structure for better alignment, including a new icon design. Enhanced functionality by adding focus behavior to the input field after message submission.
nyinyithann
pushed a commit
that referenced
this pull request
Dec 27, 2024
The answers feature check in the history WebUI controller can be safely removed, because #1 answers may be disabled for the profile even if the answers feature itself is enabled. and chromium#2 when the feature is disabled, the answer mojom fields fall back to default values with the exception of the answer text which should be empty. Bug: 381108241 Change-Id: I2c7bcd3bd38aab64263103cbea923ac1d25ad75a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6116038 Commit-Queue: Moe Ahmadi <[email protected]> Reviewed-by: John Lee <[email protected]> Code-Coverage: [email protected] <[email protected]> Cr-Commit-Position: refs/heads/main@{#1400350}
nyinyithann
pushed a commit
that referenced
this pull request
Jan 3, 2025
No change to logic. This flag is not currently in use, as we instead opted to proceed with the SITE_BLOCK flag. This removes most references to the switch, however we still need to leave the flag definition so that downstream references can be safely cleaned up. This is change #1/3. Bug: 356234122 Test: autoninja -C out/Default system_webview_google_apk Test: tools/autotest.py -C out/Default AwSupervisedUserTest Change-Id: I8c1e84ccec844064fb6648d791776b1d2da00874 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6107741 Commit-Queue: Peter Pakkenberg <[email protected]> Reviewed-by: Peter Pakkenberg <[email protected]> Auto-Submit: Nate Fischer <[email protected]> Cr-Commit-Position: refs/heads/main@{#1401748}
Introduce a character limit for chat input and display an error message when this limit is exceeded. Updated styles, UI logic, and string resources to enforce and visually represent the new constraint.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR mainly about adding Yep Chat in Taktak.