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/fetched_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/fetched_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/fetched_data.json`.

These files are currently implemented in the project:
---START_OF_FILES---
**`.eslintrc.cjs`** (21 lines of code):
```
module.exports = {
  root: true,
  env: { browser: true, es2020: true },
  extends: [
    'eslint:recommended',
    'plugin:react/recommended',
    'plugin:react/jsx-runtime',
    'plugin:react-hooks/recommended',
  ],
  ignorePatterns: ['dist', '.eslintrc.cjs'],
  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
  settings: { react: { version: '18.2' } },
  plugins: ['react-refresh'],
  rules: {
    'react/jsx-no-target-blank': 'off',
    'react-refresh/only-export-components': [
      'warn',
      { allowConstantExport: true },
    ],
  },
}
```

**`.gitignore`** (24 lines of code):
```
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
```

**`index.html`** (12 lines of code):
```
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>thisisatest</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.jsx"></script>
  </body>
</html>
```

**`package.json`** (26 lines of code):
```
{
  "name": "thisisatest",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
    "preview": "vite preview"
  },
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@types/react": "^18.2.64",
    "@types/react-dom": "^18.2.21",
    "@vitejs/plugin-react": "^4.2.1",
    "eslint": "^8.57.0",
    "eslint-plugin-react": "^7.34.0",
    "eslint-plugin-react-hooks": "^4.6.0",
    "eslint-plugin-react-refresh": "^0.4.5",
    "vite": "^5.1.6"
  }
}
```

**`vite.config.js`** (7 lines of code):
```
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
})
```

**`public/.gitkeep`** (0 lines of code):
```
```

**`src/App.css`** (7 lines of code):
```
#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

```

**`src/App.jsx`** (11 lines of code):
```
import './App.css'

function App() {
  return (
    <>
      <h1>thisisatest</h1>
    </>
  )
}

export default App
```

**`src/index.css`** (20 lines of code):
```
:root {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

```

**`src/main.jsx`** (10 lines of code):
```
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
import './index.css'

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
)
```

**`src/assets/.gitkeep`** (0 lines of code):
```
```

---END_OF_FILES---