| // Copyright 2025 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; |
| |
| option optimize_for = LITE_RUNTIME; |
| option java_package = "org.chromium.components.optimization_guide.features.proto"; |
| |
| option java_outer_classname = "ContextualTasksContextProto"; |
| |
| // 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. |
| |
| message ContextualTasksContextLoggingData { |
| ContextualTasksContextQuality quality = 1 [features = { field_presence: EXPLICIT }]; |
| } |
| |
| message ContextualTasksContextQuality { |
| // The eligible tabs for tab selection. |
| // |
| // Note that any tabs that are deemed ineligible (i.e. server upload |
| // eligibility or sensitivity) will not be included in this list. |
| repeated ContextualTasksTabContext eligible_tabs = 1; |
| |
| // The surface the query was made on. |
| ContextualTasksSurface surface = 2 [features = { field_presence: EXPLICIT }]; |
| |
| // The version of the model generating the query embedding. |
| int64 embedding_model_version = 3 [features = { field_presence: EXPLICIT }]; |
| } |
| |
| message ContextualTasksTabContext { |
| // The highest query-passage embedding score for the tab. |
| float best_embedding_score = 1 [features = { field_presence: EXPLICIT }]; |
| |
| // The number of seconds since the tab was last active. |
| int64 seconds_since_last_active = 2 [features = { field_presence: EXPLICIT }]; |
| |
| // The number of non-stop words that are common between query and tab title. |
| int64 number_of_common_words = 3 [features = { field_presence: EXPLICIT }]; |
| |
| // Aggregate score for the tab. Here for convenience even though it can be |
| // calculated from the tab. |
| float aggregate_tab_score = 4 [features = { field_presence: EXPLICIT }]; |
| |
| // Whether the tab was explicitly added to the query by the user. |
| bool was_explicitly_chosen = 5 [features = { field_presence: EXPLICIT }]; |
| } |
| |
| enum ContextualTasksSurface { |
| CONTEXTUAL_TASK_SURFACE_UNKNOWN = 0; |
| |
| CONTEXTUAL_TASK_SURFACE_NEW_TAB_PAGE = 1; |
| |
| CONTEXTUAL_TASK_SURFACE_OMNIBOX = 2; |
| |
| CONTEXTUAL_TASK_SURFACE_CONTEXTUAL_TASKS_UI = 3; |
| } |