11import {
2- CheckCircleOutlined ,
32 DatabaseOutlined ,
4- ExclamationCircleFilled ,
53 InfoCircleOutlined ,
64 PlayCircleFilled ,
75 PlayCircleOutlined ,
@@ -18,7 +16,6 @@ import {
1816 Typography ,
1917} from "antd" ;
2018import { motion , AnimatePresence } from "framer-motion" ;
21- import CheckableTag from "antd/es/tag/CheckableTag" ;
2219import { useState } from "react" ;
2320
2421import {
@@ -60,8 +57,6 @@ function PromptOutput({
6057 handleSelectDefaultLLM,
6158 llmProfileDetails,
6259 setOpenIndexProfile,
63- enabledProfiles,
64- setEnabledProfiles,
6560 isNotSingleLlmProfile,
6661 setIsIndexOpen,
6762 enforceType,
@@ -97,14 +92,6 @@ function PromptOutput({
9792 </ div >
9893 ) ;
9994
100- const handleTagChange = ( checked , profileId ) => {
101- setEnabledProfiles ( ( prevState ) =>
102- checked
103- ? [ ...prevState , profileId ]
104- : prevState . filter ( ( id ) => id !== profileId )
105- ) ;
106- } ;
107-
10895 const handleTable = ( profileId , promptOutputData ) => {
10996 if ( tableSettings ?. document_type !== "rent_rolls" )
11097 return < TableOutput output = { promptOutputData ?. output } /> ;
@@ -254,7 +241,6 @@ function PromptOutput({
254241 const promptId = promptDetails ?. prompt_id ;
255242 const docId = selectedDoc ?. document_id ;
256243 const profileId = profile ?. profile_id ;
257- const isChecked = enabledProfiles . includes ( profileId ) ;
258244 const tokenUsageId = promptId + "__" + docId + "__" + profileId ;
259245 let promptOutputData = { } ;
260246 if ( promptOutputs && Object . keys ( promptOutputs ) ) {
@@ -383,77 +369,53 @@ function PromptOutput({
383369 </ Typography . Text >
384370 </ div >
385371 < div className = "prompt-info" >
386- < div >
387- < CheckableTag
388- checked = { isChecked }
389- onChange = { ( checked ) =>
390- handleTagChange ( checked , profileId )
372+ < Tooltip title = "Run LLM for current document" >
373+ < Button
374+ size = "small"
375+ type = "text"
376+ className = "prompt-card-action-button"
377+ onClick = { ( ) =>
378+ handleRun (
379+ PROMPT_RUN_TYPES . RUN_ONE_PROMPT_ONE_LLM_ONE_DOC ,
380+ promptDetails ?. prompt_id ,
381+ profileId ,
382+ selectedDoc ?. document_id
383+ )
391384 }
392- disabled = { isPublicSource }
393- className = { isChecked ? "checked" : "unchecked" }
385+ disabled = { isPromptLoading || isPublicSource }
394386 >
395- { isChecked ? (
396- < span >
397- Enabled
398- < CheckCircleOutlined className = "prompt-output-icon-enabled" />
399- </ span >
400- ) : (
401- < span >
402- Disabled
403- < ExclamationCircleFilled className = "prompt-output-icon-disabled" />
404- </ span >
405- ) }
406- </ CheckableTag >
407- </ div >
408- < div >
409- < Tooltip title = "Run LLM for current document" >
410- < Button
411- size = "small"
412- type = "text"
413- className = "prompt-card-action-button"
414- onClick = { ( ) =>
415- handleRun (
416- PROMPT_RUN_TYPES . RUN_ONE_PROMPT_ONE_LLM_ONE_DOC ,
417- promptDetails ?. prompt_id ,
418- profileId ,
419- selectedDoc ?. document_id
420- )
421- }
422- disabled = { isPromptLoading || isPublicSource }
423- >
424- < PlayCircleOutlined className = "prompt-card-actions-head" />
425- </ Button >
426- </ Tooltip >
427- < Tooltip title = "Run LLM for all documents" >
428- < Button
429- size = "small"
430- type = "text"
431- className = "prompt-card-action-button"
432- onClick = { ( ) =>
433- handleRun (
434- PROMPT_RUN_TYPES . RUN_ONE_PROMPT_ONE_LLM_ALL_DOCS ,
435- promptDetails ?. prompt_id ,
436- profileId ,
437- null
438- )
439- }
440- disabled = { isPromptLoading || isPublicSource }
441- >
442- < PlayCircleFilled className = "prompt-card-actions-head" />
443- </ Button >
444- </ Tooltip >
445- < PromptOutputExpandBtn
446- promptId = { promptDetails ?. prompt_id }
447- llmProfiles = { llmProfileDetails }
448- enforceType = { enforceType }
449- tableSettings = { tableSettings }
450- displayLlmProfile = { true }
451- promptOutputs = { promptOutputs }
452- promptRunStatus = { promptRunStatus }
453- openExpandModal = { openExpandModal }
454- setOpenExpandModal = { setOpenExpandModal }
455- />
456- </ div >
387+ < PlayCircleOutlined className = "prompt-card-actions-head" />
388+ </ Button >
389+ </ Tooltip >
390+ < Tooltip title = "Run LLM for all documents" >
391+ < Button
392+ size = "small"
393+ type = "text"
394+ className = "prompt-card-action-button"
395+ onClick = { ( ) =>
396+ handleRun (
397+ PROMPT_RUN_TYPES . RUN_ONE_PROMPT_ONE_LLM_ALL_DOCS ,
398+ promptDetails ?. prompt_id ,
399+ profileId ,
400+ null
401+ )
402+ }
403+ disabled = { isPromptLoading || isPublicSource }
404+ >
405+ < PlayCircleFilled className = "prompt-card-actions-head" />
406+ </ Button >
407+ </ Tooltip >
408+ < PromptOutputExpandBtn
409+ promptId = { promptDetails ?. prompt_id }
410+ llmProfiles = { llmProfileDetails }
411+ enforceType = { enforceType }
412+ tableSettings = { tableSettings }
413+ displayLlmProfile = { true }
414+ promptOutputs = { promptOutputs }
415+ promptRunStatus = { promptRunStatus }
416+ openExpandModal = { openExpandModal }
417+ setOpenExpandModal = { setOpenExpandModal }
418+ />
457419 </ div >
458420 </ Space >
459421 < >
@@ -508,8 +470,6 @@ PromptOutput.propTypes = {
508470 selectedLlmProfileId : PropTypes . string ,
509471 llmProfileDetails : PropTypes . array . isRequired ,
510472 setOpenIndexProfile : PropTypes . func . isRequired ,
511- enabledProfiles : PropTypes . array . isRequired ,
512- setEnabledProfiles : PropTypes . func . isRequired ,
513473 isNotSingleLlmProfile : PropTypes . bool . isRequired ,
514474 setIsIndexOpen : PropTypes . func . isRequired ,
515475 enforceType : PropTypes . string ,
0 commit comments