From 359c277f25c323d3fd47830d569fb05f93920d3a Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Sat, 1 Jul 2023 12:36:57 -0700
Subject: explicit context pill buttons

---
 .../src/components/IterationContainer.tsx          | 77 ----------------------
 1 file changed, 77 deletions(-)
 delete mode 100644 extension/react-app/src/components/IterationContainer.tsx

(limited to 'extension/react-app/src/components/IterationContainer.tsx')

diff --git a/extension/react-app/src/components/IterationContainer.tsx b/extension/react-app/src/components/IterationContainer.tsx
deleted file mode 100644
index a0053519..00000000
--- a/extension/react-app/src/components/IterationContainer.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { useState } from "react";
-import styled from "styled-components";
-import {
-  defaultBorderRadius,
-  MainContainerWithBorder,
-  secondaryDark,
-  vscBackground,
-} from ".";
-import { RangeInFile, FileEdit } from "../../../src/client";
-import CodeBlock from "./CodeBlock";
-import SubContainer from "./SubContainer";
-
-import { ChevronDown, ChevronRight } from "@styled-icons/heroicons-outline";
-
-export interface IterationContext {
-  codeSelections: RangeInFile[];
-  instruction: string;
-  suggestedChanges: FileEdit[];
-  status: "waiting" | "accepted" | "rejected";
-  summary?: string;
-  action: string;
-  error?: string;
-}
-
-interface IterationContainerProps {
-  iterationContext: IterationContext;
-}
-
-const IterationContainerDiv = styled.div<{ open: boolean }>`
-  background-color: ${(props) => (props.open ? vscBackground : secondaryDark)};
-  border-radius: ${defaultBorderRadius};
-  padding: ${(props) => (props.open ? "2px" : "8px")};
-`;
-
-function IterationContainer(props: IterationContainerProps) {
-  const [open, setOpen] = useState(false);
-
-  return (
-    <MainContainerWithBorder className="m-2 overflow-hidden">
-      <IterationContainerDiv open={open}>
-        <p
-          className="m-2 cursor-pointer"
-          onClick={() => setOpen((prev) => !prev)}
-        >
-          {open ? <ChevronDown size="1.4em" /> : <ChevronRight size="1.4em" />}
-          {props.iterationContext.summary ||
-            props.iterationContext.codeSelections
-              .map((cs) => cs.filepath)
-              .join("\n")}
-        </p>
-
-        {open && (
-          <>
-            <SubContainer title="Action">
-              {props.iterationContext.action}
-            </SubContainer>
-            {props.iterationContext.error && (
-              <SubContainer title="Error">
-                <CodeBlock>{props.iterationContext.error}</CodeBlock>
-              </SubContainer>
-            )}
-            {props.iterationContext.suggestedChanges.map((sc) => {
-              return (
-                <SubContainer title="Suggested Change">
-                  {sc.filepath}
-                  <CodeBlock>{sc.replacement}</CodeBlock>
-                </SubContainer>
-              );
-            })}
-          </>
-        )}
-      </IterationContainerDiv>
-    </MainContainerWithBorder>
-  );
-}
-
-export default IterationContainer;
-- 
cgit v1.2.3-70-g09d2

