You are working on a project and your job is to implement new code changes based on given instructions.
Now you have to implement ALL changes that are related to `/local/data/processed_data.json` described in development instructions listed below.
Make sure you don't make any mistakes, especially ones that could affect rest of project. Your changes will be reviewed by very detailed reviewer. Because of that, it is extremely important that you are STRICTLY following ALL the following rules while implementing changes:

# RULES FOR IMPLEMENTING CODE CHANGES
---start_of_coding_rules---

## Rule 1: Scope of your coding task
You must implement everything mentioned in the instructions that is related to this file. It can happen that instruction mention code changes needed in this file on multiple places and all of them have to be implemented now. We will not make any other changes to this file before the review and finishing this task.

## Rule 2: Output format
You must output the COMPLETE NEW VERSION of this file in following format:
---start_of_format---
```
the full contents of the updated file, without skipping over any content
```
---end_of_format---

## Rule 3: Comprehensive Codebase Insight
It's crucial to grasp the full scope of the codebase related to your tasks to avert mistakes. Check the initial conversation message for a list of files. Pay a lot of attention to files that are directly included in the file you are currently modifying or that are importing your file.
Consider these examples to guide your approach and thought process:
---start_of_examples---
- UI components or templates: Instead of placing scripts directly on specific pages, integrating them in the <head> section or as reusable partials enhances application-wide consistency and reusability.
- Database operations: Be careful not to execute an action, like password hashing, both in a routing function and a model's pre('save') hook, which could lead to redundancy and errors.
- Adding backend logic: Prior to creating new functions, verify if an equivalent function exists in the codebase that you could import and use, preventing unnecessary code duplication and keeping the project efficient.
---end_of_examples---

## Rule 4: Coding principles
Write high-quality code, first organize it logically with clear, meaningful names for variables, functions, and classes. Aim for simplicity and adhere to the DRY (Don't Repeat Yourself) principle to avoid code duplication. Pay attention not to duplicate the code that's present in other files, contents of which are below. Ensure your codebase is structured and modular for easy navigation and updates.

If the instructions have comments like `// ..add code here...` or `# placeholder for code`, instead of copying the comment, interpret the instructions and output the relevant code.

Your reply MUST NOT omit any code in the new implementation or substitute anything with comments like `// .. rest of the code goes here ..` or `# insert existing code here`, because I will overwrite the existing file with the content you provide. Output ONLY the content for this file, without additional explanation, suggestions or notes. Your output MUST start with ``` and MUST end with ``` and include only the complete file contents.

When working with configuration files (e.g. config.json, .env,...), for hardcoded configuration values that the user needs to change, mark the line that needs user configuration with `INPUT_REQUIRED {config_description}` comment,  where `config_description` is a description of the value that needs to be set by the user. Use appropriate syntax for comments in the file you're saving (for example `// INPUT_REQUIRED {config_description}` in JavaScript). NEVER ask the user to write code or provide implementation, even if the instructions suggest it! If the file type doesn't support comments (eg JSON), don't add any.

## Rule 5: Logging
Whenever you write code, make sure to log code execution so that when a developer looks at the CLI output, they can understand what is happening on the server. If the description above mentions the exact code that needs to be added but doesn't contain enough logs, you need to add the logs handlers inside that code yourself.

## Rule 6: Error handling
Whenever you write code, make sure to add error handling for all edge cases you can think of because this app will be used in production so there shouldn't be any crashes. Whenever you log the error, you **MUST** log the entire error message and trace and not only the error message. If the description above mentions the exact code that needs to be added but doesn't contain enough error handlers, you need to add the error handlers inside that code yourself.

---end_of_coding_rules---

You are currently working on this task:
```
Create a new component TodoList: This component will display the list of todo items. Use localStorage directly to access the current state of todos and map over them, rendering each todo item as a list item. Each item should display the todo's description and a checkbox that reflects the todo's state (checked for completed, unchecked for open). When the checkbox is clicked, dispatch an action to toggle the state of the todo. Also create AddTodo: This component will include a button that, when clicked, displays a prompt asking the user for a description of the new todo. Upon confirmation, dispatch an action to add the new todo to the state with a default state of open. Ensure the component also updates the local storage with the new list of todos. Finally, use TodoList and AddTodo components in App component to implement the required functionality. Integrate Boostrap 5 for styling - add CSS/JS to index.html, style App.jsx and other files as appropriate.
```


Here are development instructions and now you have to focus only on changes in `/local/data/processed_data.json`:
---start_of_development_instructions---


{"code":200,"status":true,"model":"gpt-4o","message":"To implement the task described, we'll be creating two new React components, `TodoList` and `AddTodo`, and modifying existing files to use these components. We'll also ensure Bootstrap 5 is integrated for styling. Here’s a step-by-step guide on what needs to be done:\n\n### 1. Install Bootstrap CSS and JS in `index.html`\n\nFirst, include the Bootstrap 5 CDN links in the `<head>` section of your `index.html`. This will enable us to use Bootstrap for styling purposes.\n\nUpdate `index.html` as follows:\n\n```html\n<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>thisisatest</title>\n    <link\n      href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css\"\n      rel=\"stylesheet\"\n    />\n    <script\n      src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js\"\n      defer\n    ></script>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n```\n\n### 2. Create the `TodoList` Component\n\nCreate a new file `src/components/TodoList.jsx` to handle the display and toggling of todo items.\n\n```jsx\nimport React, { useState, useEffect } from 'react';\n\nconst TodoList = () => {\n  const [todos, setTodos] = useState(JSON.parse(localStorage.getItem('todos')) || []);\n\n  useEffect(() => {\n    localStorage.setItem('todos', JSON.stringify(todos));\n  }, [todos]);\n\n  const toggleTodo = (index) => {\n    const updatedTodos = todos.map((todo, i) => \n      i === index ? { ...todo, completed: !todo.completed } : todo\n    );\n    setTodos(updatedTodos);\n  };\n\n  return (\n    <ul className=\"list-group\">\n      {todos.map((todo, index) => (\n        <li key={index} className=\"list-group-item d-flex justify-content-between align-items-center\">\n          <span>{todo.description}</span>\n          <input\n            type=\"checkbox\"\n            checked={todo.completed}\n            onChange={() => toggleTodo(index)}\n          />\n        </li>\n      ))}\n    </ul>\n  );\n};\n\nexport default TodoList;\n```\n\n### 3. Create the `AddTodo` Component\n\nCreate another file `src/components/AddTodo.jsx` for adding new tasks to the todo list.\n\n```jsx\nimport React from 'react';\n\nconst AddTodo = ({ onAdd }) => {\n  const addNewTodo = () => {\n    const description = prompt('Enter the description for the new todo:');\n    if (description) {\n      onAdd({ description, completed: false });\n    }\n  };\n\n  return (\n    <button className=\"btn btn-primary my-3\" onClick={addNewTodo}>\n      Add New Todo\n    </button>\n  );\n};\n\nexport default AddTodo;\n```\n\n### 4. Update the `App` component to use `TodoList` and `AddTodo`\n\nModify `src/App.jsx` to utilize the `TodoList` and `AddTodo` components.\n\n```jsx\nimport React, { useState } from 'react';\nimport './App.css';\nimport TodoList from './components/TodoList.jsx';\nimport AddTodo from './components/AddTodo.jsx';\n\nfunction App() {\n  const [todos, setTodos] = useState(JSON.parse(localStorage.getItem('todos')) || []);\n\n  const addTodo = (newTodo) => {\n    const updatedTodos = [...todos, newTodo];\n    setTodos(updatedTodos);\n    localStorage.setItem('todos', JSON.stringify(updatedTodos));\n  };\n\n  return (\n    <div className=\"container\">\n      <h1 className=\"my-4\">thisisatest ToDo App</h1>\n      <AddTodo onAdd={addTodo} />\n      <TodoList todos={todos} setTodos={setTodos} />\n    </div>\n  );\n}\n\nexport default App;\n```\n\n### 5. Adjust CSS Styles (if needed)\n\nYou can add any necessary styling in `src/App.css` to complement Bootstrap components. For instance, if needed, you can refine button or list styles using Bootstrap classes.\n\n### Final Thoughts\n\nAfter implementing these steps, your app should be functional with both displaying and adding todos, fully styled with Bootstrap. No commands outside file editing are required as we're using libraries and tools already set up in your project.","original":null}

---end_of_development_instructions---

You need to create a new file `/local/data/processed_data.json`.

These files are currently implemented in the project:
* `.eslintrc.cjs: Configuration file for ESLint, a static code analysis tool for identifying problematic patterns found in JavaScript code. It defines rules for linting JavaScript code with a focus on React applications.`
* `.gitignore: Specifies patterns to exclude files and directories from being tracked by Git version control system. It is used to prevent certain files from being committed to the repository.`
* `index.html: Main entry point for the project. It includes a basic HTML structure with a root div element and a script tag importing a JavaScript file named main.jsx using the module type. References: src/main.jsx`
* `package.json: Standard Nodejs package metadata file, specifies dependencies and start scripts. It also specifies that the project is a module.`
* `vite.config.js: Configuration file for Vite, a fast developer-friendly Javascript bundler/devserver.`
* `public/.gitkeep: Empty file`
* `src/App.css: Contains styling rules for the root element of the application, setting a maximum width, centering it on the page, adding padding, and aligning text to the center.`
* `src/App.jsx: Defines a functional component that serves as the root component in the project. The component is exported as the default export. References: src/App.css`
* `src/index.css: Defines styling rules for the root element, body, and h1 elements of a web page.`
* `src/main.jsx: Main entry point for a React application. It imports necessary modules, renders the main component 'App' inside a 'React.StrictMode' component, and mounts it to the root element in the HTML document. References: App.jsx, index.css`
* `src/assets/.gitkeep: Empty file`

Here are the complete contents of files relevant to this task:
---START_OF_FILES---
---END_OF_FILES---