Skip to content

Build AI methods with your coding agent, then run them anywhere: as an MCP for chatbots, as a webapp for people, or via API for your software.

Fix 5 Cubic review comments on PR #769

Louis Choquel353ce44ad0ab
diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md
index 56f6fdc3f..c2e5c7575 100644
--- a/.claude/skills/release/SKILL.md
+++ b/.claude/skills/release/SKILL.md
@@ -70,10 +70,11 @@ Add a new version entry at the top of the changelog for the release.
3. **Never add an `[Unreleased]` heading.** The changelog should only contain
concrete version entries.
4. If the user provided changelog content when invoking the skill (e.g.
- `/release Added new extract backend`), use that content as the changelog
- entry for this version. Format it properly under the appropriate heading
- (e.g. `### Added`, `### Changed`, `### Fixed`), inferring the heading from
- the content when possible.
+ `/release Added new extract backend`), **merge** that content with any
+ existing `[Unreleased]` content (do not discard either source). Format the
+ combined content properly under the appropriate headings (e.g. `### Added`,
+ `### Changed`, `### Fixed`), inferring headings from the content when
+ possible.
5. If the release has no changelog content yet (neither from an `[Unreleased]`
section nor from inline user input), ask the user what to include before
proceeding.
diff --git a/Makefile b/Makefile
index ff9c75b18..9a70abc46 100644
--- a/Makefile
+++ b/Makefile
@@ -885,8 +885,7 @@ endif
if [ -f "$$TMPDIR/latest/llms-full.txt" ]; then cp "$$TMPDIR/latest/llms-full.txt" "$$TMPDIR/llms-full.txt"; fi && \
cd "$$TMPDIR" && \
git add 404.html robots.txt index.html sitemap.xml && \
- if [ -f llms.txt ]; then git add llms.txt; fi && \
- if [ -f llms-full.txt ]; then git add llms-full.txt; fi && \
+ git add -A llms.txt llms-full.txt 2>/dev/null; \
(git diff --cached --quiet || git commit -m "Update root assets (404.html, robots.txt, index.html, sitemap.xml, llms.txt)") && \
git push origin gh-pages
diff --git a/docs/building-methods/concepts/native-concepts.md b/docs/building-methods/concepts/native-concepts.md
index 3effe97a9..b7f7184cb 100644
--- a/docs/building-methods/concepts/native-concepts.md
+++ b/docs/building-methods/concepts/native-concepts.md
@@ -196,7 +196,7 @@ Represents the result of a web search query. Produced by `PipeSearch`:
```python
class SearchResultContent(StuffContent):
answer: str
- sources: list[DocumentContent] = []
+ sources: list[DocumentContent] = Field(default_factory=empty_list_factory_of(DocumentContent))
```
**Fields:**
diff --git a/pipelex/core/stuffs/document_content.py b/pipelex/core/stuffs/document_content.py
index bd86f002f..427b485dc 100644
--- a/pipelex/core/stuffs/document_content.py
+++ b/pipelex/core/stuffs/document_content.py
@@ -77,7 +77,7 @@ class DocumentContent(StuffContent):
@override
def rendered_markdown(self, level: int = 1, is_pretty: bool = False) -> str:
display_text = self.title or self.public_url or self.url
- result = f"[{display_text}]({self.url})"
+ result = f"[{display_text}]({self.public_url or self.url})"
if self.snippet:
result += f"\n {self.snippet}"
return result
diff --git a/pipelex/plugins/gateway/gateway_extract_worker.py b/pipelex/plugins/gateway/gateway_extract_worker.py
index 3c8a3454c..c40ef0cf5 100644
--- a/pipelex/plugins/gateway/gateway_extract_worker.py
+++ b/pipelex/plugins/gateway/gateway_extract_worker.py
@@ -123,7 +123,7 @@ class GatewayExtractWorker(ExtractWorkerAbstract):
job_params = extract_job.job_params
max_nb_images = job_params.max_nb_images
- extract_images = max_nb_images is None or max_nb_images != 0
+ extract_images = max_nb_images is None or max_nb_images > 0
fetch_params = GatewayFetchRequestParams(
url=document_uri,
diff --git a/tests/unit/pipelex/core/stuffs/document_content/test_data.py b/tests/unit/pipelex/core/stuffs/document_content/test_data.py
index 67e1991a2..a199d559d 100644
--- a/tests/unit/pipelex/core/stuffs/document_content/test_data.py
+++ b/tests/unit/pipelex/core/stuffs/document_content/test_data.py
@@ -32,7 +32,7 @@ class TestData:
# Expected outputs for render methods
EXPECTED_RENDERED_PLAIN = URLs.pdf_example_1
EXPECTED_RENDERED_MARKDOWN = f"[{URLs.pdf_example_1}]({URLs.pdf_example_1})"
- EXPECTED_RENDERED_MARKDOWN_WITH_DISPLAY_LINK = f"[Report.pdf]({URLs.pdf_example_1})"
+ EXPECTED_RENDERED_MARKDOWN_WITH_DISPLAY_LINK = "[Report.pdf](Report.pdf)"
EXPECTED_RENDERED_HTML = f'<a href="{URLs.pdf_example_1}" class="msg-document">{URLs.pdf_example_1}</a>'
EXPECTED_RENDERED_HTML_WITH_PUBLIC_URL = '<a href="Report.pdf" class="msg-document">Report.pdf</a>'
# rendered_for_prompt returns just the URL for documents