@@ -10,8 +10,6 @@ import type * as Platform from '../../../core/platform/platform.js';
1010import * as SDK from '../../../core/sdk/sdk.js' ;
1111import * as Protocol from '../../../generated/protocol.js' ;
1212import * as AiAssistanceModel from '../../../models/ai_assistance/ai_assistance.js' ;
13- import * as GreenDev from '../../../models/greendev/greendev.js' ;
14- import * as Trace from '../../../models/trace/trace.js' ;
1513import * as Workspace from '../../../models/workspace/workspace.js' ;
1614import * as PanelsCommon from '../../../panels/common/common.js' ;
1715import * as PanelUtils from '../../../panels/utils/utils.js' ;
@@ -123,7 +121,6 @@ export interface ViewInput {
123121 inputPlaceholder : Platform . UIString . LocalizedString ;
124122 selectedContext : AiAssistanceModel . AiAgent . ConversationContext < unknown > | null ;
125123 inspectElementToggled : boolean ;
126- additionalFloatyContext : UI . Floaty . FloatyContextSelection [ ] ;
127124 disclaimerText : string ;
128125 conversationType : AiAssistanceModel . AiHistoryStorage . ConversationType ;
129126 multimodalInputEnabled : boolean ;
@@ -151,22 +148,19 @@ export interface ViewInput {
151148
152149export type ViewOutput = undefined ;
153150
154- export const
155- DEFAULT_VIEW =
156- ( input : ViewInput , output : ViewOutput , target : HTMLElement ) :
157- void => {
158- const chatInputContainerCls = Lit . Directives . classMap ( {
159- 'chat-input-container' : true ,
160- 'single-line-layout' : ! input . selectedContext && ! input . onContextAdd ,
161- disabled : input . isTextInputDisabled ,
162- } ) ;
163-
164- const renderRelevantDataDisclaimer = ( tooltipId : string ) : Lit . LitTemplate => {
165- const classes = Lit . Directives . classMap ( {
166- 'chat-input-disclaimer' : true ,
167- 'hide-divider' : ! input . isLoading && input . blockedByCrossOrigin ,
168- } ) ;
169- // clang-format off
151+ export const DEFAULT_VIEW = ( input : ViewInput , _output : ViewOutput , target : HTMLElement ) : void => {
152+ const chatInputContainerCls = Lit . Directives . classMap ( {
153+ 'chat-input-container' : true ,
154+ 'single-line-layout' : ! input . selectedContext && ! input . onContextAdd ,
155+ disabled : input . isTextInputDisabled ,
156+ } ) ;
157+
158+ const renderRelevantDataDisclaimer = ( tooltipId : string ) : Lit . LitTemplate => {
159+ const classes = Lit . Directives . classMap ( {
160+ 'chat-input-disclaimer' : true ,
161+ 'hide-divider' : ! input . isLoading && input . blockedByCrossOrigin ,
162+ } ) ;
163+ // clang-format off
170164 return html `
171165 < div class =${ classes } >
172166 < button
@@ -198,10 +192,10 @@ export const
198192 </ div > </ devtools-tooltip >
199193 </ div >
200194 ` ;
201- // clang-format on
202- } ;
195+ // clang-format on
196+ } ;
203197
204- // clang-format off
198+ // clang-format off
205199 Lit . render ( html `
206200 < style > ${ Input . textInputStyles } </ style >
207201 < style > ${ chatInputStyles } </ style >
@@ -226,52 +220,6 @@ export const
226220 :
227221 html `
228222 < form class ="input-form " @submit =${ input . onSubmit } >
229- ${ GreenDev . Prototypes . instance ( ) . isEnabled ( 'inDevToolsFloaty' ) ?
230- html `
231- < ul class ="floaty ">
232- ${ input . additionalFloatyContext . map ( c => {
233- return html `
234- < li >
235- < span class ="context-item ">
236- ${ c instanceof SDK . NetworkRequest . NetworkRequest ? html `${ c . url ( ) } ` :
237- c instanceof SDK . DOMModel . DOMNode ? html `
238- < devtools-widget .widgetConfig =${
239- UI . Widget . widgetConfig ( PanelsCommon . DOMLinkifier . DOMNodeLink , { node : c } ) }
240- > </ devtools-widget > ` :
241- 'insight' in c ? html `${ c . insight . title } ` :
242- 'event' in c && 'traceStartTime' in c ? html `
243- ${ c . event . name } @ ${ i18n . TimeUtilities . formatMicroSecondsAsMillisFixed ( Trace . Types . Timing . Micro ( c . event . ts - c . traceStartTime ) ) } ` :
244- Lit . nothing }
245- </ span >
246- < devtools-button
247- class ="floaty-delete-button "
248- @click =${ ( e : MouseEvent ) => {
249- e . preventDefault ( ) ;
250- UI . Floaty . onFloatyContextDelete ( c ) ;
251- } }
252- .data =${ {
253- variant : Buttons . Button . Variant . ICON ,
254- iconName : 'cross' ,
255- title : 'Delete' ,
256- size : Buttons . Button . Size . SMALL ,
257- } as Buttons . Button . ButtonData }
258- > </ devtools-button >
259- </ li > ` ;
260- } ) }
261- < li class ="open-floaty ">
262- < devtools-button
263- class ="floaty-add-button "
264- @click =${ UI . Floaty . onFloatyOpen }
265- .data =${ {
266- variant : Buttons . Button . Variant . ICON ,
267- iconName : 'select-element' ,
268- title : 'Open context picker' ,
269- size : Buttons . Button . Size . SMALL ,
270- } as Buttons . Button . ButtonData }
271- > </ devtools-button >
272- </ li >
273- </ ul > `
274- : Lit . nothing }
275223 < div class =${ chatInputContainerCls } >
276224 ${ ( input . multimodalInputEnabled && input . imageInput && ! input . isTextInputDisabled ) ?
277225 html `
@@ -495,8 +443,8 @@ export const
495443 ${ renderRelevantDataDisclaimer ( RELEVANT_DATA_LINK_FOOTER_ID ) }
496444 </ footer >
497445 ` , target ) ;
498- // clang-format on
499- } ;
446+ // clang-format on
447+ } ;
500448
501449/**
502450 * ChatInput is a presenter for the input area in the AI Assistance panel.
@@ -508,7 +456,6 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
508456 inputPlaceholder = '' as Platform . UIString . LocalizedString ;
509457 selectedContext = null as AiAssistanceModel . AiAgent . ConversationContext < unknown > | null ;
510458 inspectElementToggled = false ;
511- additionalFloatyContext = [ ] as UI . Floaty . FloatyContextSelection [ ] ;
512459 disclaimerText = '' ;
513460 conversationType = AiAssistanceModel . AiHistoryStorage . ConversationType . STYLING ;
514461 multimodalInputEnabled = false ;
@@ -697,7 +644,6 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
697644 selectedContext : this . selectedContext ,
698645 inspectElementToggled : this . inspectElementToggled ,
699646 isTextInputEmpty : this . #isTextInputEmpty( ) ,
700- additionalFloatyContext : this . additionalFloatyContext ,
701647 disclaimerText : this . disclaimerText ,
702648 conversationType : this . conversationType ,
703649 multimodalInputEnabled : this . multimodalInputEnabled ,
0 commit comments