From ab97ce1a0b188b0f29ee42ad969fe0d072c78971 Mon Sep 17 00:00:00 2001 From: Isaac Johnson Date: Mon, 13 Oct 2025 06:45:05 -0500 Subject: [PATCH] 0.15 - fix indentation --- Dockerfile | 2 +- gemini-extension.json | 4 ++-- main.py | 47 ++++++++++++++++++++++--------------------- 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3ddf115..706303d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,4 +20,4 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["python", "main.py"] -#harbor.freshbrewed.science/library/vikunjamcp:0.14 +#harbor.freshbrewed.science/library/vikunjamcp:0.15 diff --git a/gemini-extension.json b/gemini-extension.json index 85b69c4..fff6fba 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "vikunja", - "version": "1.0.14", + "version": "1.0.15", "mcpServers": { "nodeServer": { "command": "docker", @@ -14,7 +14,7 @@ "VIKUNJA_USERNAME", "-e", "VIKUNJA_PASSWORD", - "harbor.freshbrewed.science/library/vikunjamcp:0.14" + "harbor.freshbrewed.science/library/vikunjamcp:0.15" ], "env": { "VIKUNJA_URL": "$VIKUNJA_URL", diff --git a/main.py b/main.py index 8a736a3..36b15aa 100644 --- a/main.py +++ b/main.py @@ -189,33 +189,34 @@ def comment_task(task_id: int, description: str): - @mcp.tool() - def update_comment(task_id: int, comment_id: int, comment: str): - """ - Updates an existing comment on a task. +@mcp.tool() +def update_comment(task_id: int, comment_id: int, comment: str): + """ + Updates an existing comment on a task. - :param task_id: The ID of the task. - :param comment_id: The ID of the comment to update. - :param comment: The updated comment text. - """ - if "Authorization" not in session.headers: - return "Please run the 'login' command first." + :param task_id: The ID of the task. + :param comment_id: The ID of the comment to update. + :param comment: The updated comment text. + """ + if "Authorization" not in session.headers: + return "Please run the 'login' command first." - if not (comment or "").strip(): - return "Comment cannot be empty." + if not (comment or "").strip(): + return "Comment cannot be empty." - payload = {"comment": comment} + payload = {"comment": comment} - try: - response = session.post( - f"{VIKUNJA_URL}/api/v1/tasks/{task_id}/comments/{comment_id}", - json=payload - ) - response.raise_for_status() - return response.json() - except requests.exceptions.RequestException as e: - logger.exception("update_comment: request failed for task_id=%s, comment_id=%s", task_id, comment_id) - return f"Error updating comment for task: {e}" + try: + response = session.post( + f"{VIKUNJA_URL}/api/v1/tasks/{task_id}/comments/{comment_id}", + json=payload + ) + response.raise_for_status() + return response.json() + except requests.exceptions.RequestException as e: + logger.exception("update_comment: request failed for task_id=%s, comment_id=%s", task_id, comment_id) + return f"Error updating comment for task: {e}" + @mcp.tool() def lookup_project(): """