(
graph_context: GraphContext,
prompt: str,
attachments: Sequence[Union[str, Path]],
)
| 45 | |
| 46 | |
| 47 | def _build_task_input( |
| 48 | graph_context: GraphContext, |
| 49 | prompt: str, |
| 50 | attachments: Sequence[Union[str, Path]], |
| 51 | ) -> Union[str, list[Message]]: |
| 52 | if not attachments: |
| 53 | return prompt |
| 54 | |
| 55 | attachments_dir = graph_context.directory / "code_workspace" / "attachments" |
| 56 | attachments_dir.mkdir(parents=True, exist_ok=True) |
| 57 | store = AttachmentStore(attachments_dir) |
| 58 | builder = TaskInputBuilder(store) |
| 59 | normalized_paths = [str(Path(path).expanduser()) for path in attachments] |
| 60 | return builder.build_from_file_paths(prompt, normalized_paths) |
| 61 | |
| 62 | |
| 63 | def _resolve_yaml_path(yaml_file: Union[str, Path]) -> Path: |
no test coverage detected