Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarika-padmanaban committed Nov 18, 2024
1 parent 2ecd566 commit 76e0272
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 44 deletions.
58 changes: 29 additions & 29 deletions src/app/ui/pages/chat/SuperCheckerPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -912,29 +912,6 @@ const SuperCheckerPage = () => {
placeholder="Superchecker Notes"
></ReactQuill>
</div>
<Button
variant="contained"
style={{
marginLeft: "10px",
backgroundColor: "lightgrey",
color: "black",
}}
endIcon={
showGlossary ? <ArrowRightIcon /> : <ArrowDropDownIcon />
}
onClick={handleGlossaryClick}
disabled
>
Glossary
</Button>
<div
style={{
display: showGlossary ? "block" : "none",
paddingBottom: "16px",
}}
>
{/* <Glossary taskData={taskData} /> */}
</div>
{ProjectDetails.revision_loop_count >
taskData?.revision_loop_count?.super_check_count
? false
Expand Down Expand Up @@ -1094,18 +1071,15 @@ const SuperCheckerPage = () => {
)}
</Grid>
<Grid item>
{ProjectDetails.project_type == "InstructionDrivenChat"?(<Grid item>
{!disableSkip && taskData?.super_check_user === userData?.id && (
<Tooltip title="clear the entire chat history">
<Button
value="Clear Chats"
type="default"
variant="outlined"
onClick={() =>
handleSuperCheckerClick(
"delete",
SuperChecker.id,
SuperChecker.lead_time,
)
handleSuperCheckerClick("delete", SuperChecker.id, SuperChecker.lead_time)
}
style={{
minWidth: "150px",
Expand All @@ -1122,7 +1096,33 @@ const SuperCheckerPage = () => {
</Button>
</Tooltip>
)}
</Grid>
</Grid>):((<Grid item>
{!disableSkip && taskData?.super_check_user === userData?.id && (
<Tooltip title="Reset the entire chat history">
<Button
value="Reset All"
type="default"
variant="outlined"
onClick={() =>
handleSuperCheckerClick("delete", SuperChecker.id, SuperChecker.lead_time)
}
style={{
minWidth: "150px",
color: "black",
borderRadius: "5px",
border: "0px",
pt: 2,
pb: 2,
backgroundColor: "#ffe0b2",
}}
// className="lsf-button"
>
Reset All
</Button>
</Tooltip>
)}
</Grid>))}

<Grid item>
{taskData?.super_check_user === userData?.id && (
<Tooltip title="Reject">
Expand Down
23 changes: 8 additions & 15 deletions src/app/ui/pages/n-screen-preference-ranking/PreferenceRanking.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,15 @@ const PreferenceRanking = ({

const forms = result.map((currentForm) => ({
prompt: currentForm.prompt || "",
model_responses_json: (Array.isArray(currentForm.output)
? currentForm.output.map((item) => ({
...item,
output: item.value,
}))
: [{ output: currentForm.output }]
).map((modelResponse) => ({
model_responses_json: currentForm.model_responses_json.map((modelResponse) => ({
...modelResponse,
questions_response:
modelResponse?.questions_response?.map(
(questionResponse, index) => ({
...questionResponse,
question: questions[index],
response: questionResponse?.response || [],
})
) || [],
output: modelResponse.output || "",
model_name: modelResponse.model_name || "",
questions_response: modelResponse.questions_response.map((questionResponse) => ({
...questionResponse,
question: questionResponse?.question || {},
response: questionResponse?.response || [],
})),
})),
prompt_output_pair_id: currentForm?.prompt_output_pair_id || null,
additional_note: currentForm?.additional_note || "",
Expand Down

0 comments on commit 76e0272

Please sign in to comment.