(self)
| 185 | self.do_add_web_page() |
| 186 | |
| 187 | def do_add_files(self): |
| 188 | fnames = st.multiselect( |
| 189 | "Add files to the chat", |
| 190 | self.coder.get_all_relative_files(), |
| 191 | default=self.state.initial_inchat_files, |
| 192 | placeholder="Files to edit", |
| 193 | disabled=self.prompt_pending(), |
| 194 | help=( |
| 195 | "Only add the files that need to be *edited* for the task you are working" |
| 196 | " on. Aider will pull in other relevant code to provide context to the LLM." |
| 197 | ), |
| 198 | ) |
| 199 | |
| 200 | for fname in fnames: |
| 201 | if fname not in self.coder.get_inchat_relative_files(): |
| 202 | self.coder.add_rel_fname(fname) |
| 203 | self.info(f"Added {fname} to the chat") |
| 204 | |
| 205 | for fname in self.coder.get_inchat_relative_files(): |
| 206 | if fname not in fnames: |
| 207 | self.coder.drop_rel_fname(fname) |
| 208 | self.info(f"Removed {fname} from the chat") |
| 209 | |
| 210 | def do_add_web_page(self): |
| 211 | with st.popover("Add a web page to the chat"): |
no test coverage detected