Change up refinement UI (#66)
* Remove unused ScenarioVariantCell fields * Refine deriveNewConstructFn * Fix prettier * Remove migration script * Add refine modal * Fix prettier * Fix diff checker overflow * Decrease diff height * Add more context to prompt refining * Auto-expand prompt when refining
This commit is contained in:
@@ -12,7 +12,6 @@ const CompareFunctions = ({
|
||||
originalFunction: string;
|
||||
newFunction?: string;
|
||||
}) => {
|
||||
console.log("newFunction", newFunction);
|
||||
const highlightSyntax = (str: string) => {
|
||||
let highlighted;
|
||||
try {
|
||||
@@ -25,17 +24,17 @@ const CompareFunctions = ({
|
||||
};
|
||||
return (
|
||||
<HStack w="full" spacing={5}>
|
||||
<VStack w="full" spacing={4} maxH="65vh" fontSize={12} lineHeight={1} overflowY="auto">
|
||||
<VStack w="full" spacing={4} maxH="50vh" fontSize={12} lineHeight={1} overflowY="auto">
|
||||
<DiffViewer
|
||||
oldValue={originalFunction}
|
||||
newValue={newFunction || originalFunction}
|
||||
splitView={true}
|
||||
hideLineNumbers={true}
|
||||
leftTitle="Original"
|
||||
rightTitle={newFunction ? "Modified" : "Unmodified"}
|
||||
disableWordDiff={true}
|
||||
compareMethod={DiffMethod.CHARS}
|
||||
renderContent={highlightSyntax}
|
||||
showDiffOnly={false}
|
||||
/>
|
||||
</VStack>
|
||||
</HStack>
|
||||
|
||||
Reference in New Issue
Block a user