| // Copyright 2023 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| edition = "2023"; |
| |
| package optimization_guide.proto; |
| |
| import "components/optimization_guide/proto/features/common_quality_data.proto"; |
| |
| import "components/optimization_guide/proto/model_quality_metadata.proto"; |
| |
| option optimize_for = LITE_RUNTIME; |
| option java_package = "org.chromium.components.optimization_guide.features.proto"; |
| |
| option java_outer_classname = "TabOrganizationProto"; |
| |
| // DO NOT EDIT THIS FILE DIRECTLY! |
| // |
| // This file is generated in g3 and then synced to Chrome. Instead, please refer to |
| // http://go/chrome-mqls-onboarding (Google-internal link), and then changes will |
| // be synced with Chrome automatically. |
| |
| // Next ID: 7 |
| message TabOrganizationLoggingData { |
| TabOrganizationRequest request = 1 [features = { field_presence: EXPLICIT }]; |
| |
| TabOrganizationResponse response = 2 [features = { field_presence: EXPLICIT }]; |
| |
| TabOrganizationQuality quality = 3 [features = { field_presence: EXPLICIT }]; |
| |
| ModelExecutionInfo model_execution_info = 6 [features = { field_presence: EXPLICIT }]; |
| |
| reserved 4, 5; |
| } |
| |
| // Next ID: 8 |
| message TabOrganizationRequest { |
| // The ungrouped tabs that are requested to be organized. |
| repeated Tab tabs = 1; |
| |
| // The tab that was active at the time the user requested tab organization. |
| int64 active_tab_id = 2 [features = { field_presence: IMPLICIT }]; |
| |
| // All pre-existing tab groups. |
| repeated TabGroup pre_existing_tab_groups = 3; |
| |
| // Whether or not the tab organization response can include reorganizing |
| // existing tab groups. |
| bool allow_reorganizing_existing_groups = 4 [features = { field_presence: IMPLICIT }]; |
| |
| // The clustering algorithm that the user prefers the model to use for |
| // grouping the tabs. For now it is an experimental field and should not be |
| // used in prod. |
| TabOrganizationModelStrategy model_strategy = 5 [features = { field_presence: IMPLICIT }]; |
| |
| // The direct user instruction about how the tabs should be organized. |
| string user_command = 6 [features = { field_presence: IMPLICIT }]; |
| |
| // The previous responses from the model. On the client side, we will only |
| // send a few (less than 3) of them. |
| repeated TabOrganizationResponse previous_responses = 7; |
| |
| // The clustering algorithm that the user prefers the model to use for |
| // grouping the tabs. |
| enum TabOrganizationModelStrategy { |
| STRATEGY_UNSPECIFIED = 0; |
| |
| STRATEGY_TOPIC_BASED = 1; |
| |
| STRATEGY_TASK_BASED = 2; |
| |
| STRATEGY_DOMAIN_BASED = 3; |
| } |
| } |
| |
| // Next ID: 2 |
| message TabOrganizationResponse { |
| // The groups that were deemed suitable for the requested tabs. |
| // |
| // These groups will be in the order of suitability and it is expected for |
| // them to be shown in the order present in the list. |
| // |
| // Note that not all requested tabs are guaranteed to be present in at least |
| // one group. |
| repeated TabGroup tab_groups = 1; |
| } |
| |
| // Next ID: 3 |
| message TabOrganizationQuality { |
| repeated Organization organizations = 1; |
| |
| UserFeedback user_feedback = 2 [features = { field_presence: IMPLICIT }]; |
| |
| // Next ID: 5 |
| message Organization { |
| // Any tabs that were removed from the organization before accepting. |
| repeated int64 removed_tab_ids = 1; |
| |
| Label label = 2 [features = { field_presence: EXPLICIT }]; |
| |
| Choice choice = 3 [features = { field_presence: IMPLICIT }]; |
| |
| // TODO(crbug.com/331852814): Remove along with the multi tab organization flag |
| UserFeedback user_feedback = 4 [features = { field_presence: IMPLICIT }]; |
| |
| // The label of the organization if it was accepted. |edited| signifies that |
| // the label was edited. |
| // Next ID: 2 |
| message Label { |
| bool edited = 1 [features = { field_presence: IMPLICIT }]; |
| } |
| |
| // What the user decided to do with the organization. NOT_USED means that |
| // the user either didn't choose an action when presented with the |
| // organization or it wasnt shown to the user. Accepted means the |
| // organization was used. Rejected means the user did not want the |
| // organization. |
| // Next ID: 3 |
| enum Choice { |
| NOT_USED = 0; |
| |
| ACCEPTED = 1; |
| |
| REJECTED = 2; |
| } |
| } |
| } |