Fixed Taiga integration
This commit is contained in:
@@ -131,6 +131,27 @@ TOOL_DEFINITIONS: list[dict[str, Any]] = [
|
||||
"parameters": {"type": "object", "properties": {}, "required": []},
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "list_taiga_tasks",
|
||||
"description": (
|
||||
"ОБЯЗАТЕЛЬНО при вопросах «какие задачи», «покажи задачи проекта», «что открыто в Taiga». "
|
||||
"Живые user stories и tasks из Taiga API. НЕ путать с list_work_items."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"project_slug": {
|
||||
"type": "string",
|
||||
"description": "Slug проекта, например home_assistant. Пусто = все проекты.",
|
||||
},
|
||||
"limit": {"type": "integer", "description": "Макс. на проект, по умолчанию 20"},
|
||||
},
|
||||
"required": [],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
@@ -156,7 +177,10 @@ TOOL_DEFINITIONS: list[dict[str, Any]] = [
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "list_work_items",
|
||||
"description": "Список созданных work items (Taiga + Gitea связки).",
|
||||
"description": (
|
||||
"Только задачи, созданные ЭТИМ ассистентом через create_work_item (локальная БД). "
|
||||
"НЕ использовать для общего вопроса «какие задачи в Taiga» — для того list_taiga_tasks."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -201,6 +225,11 @@ async def execute_tool(db: Session, name: str, arguments: dict[str, Any]) -> str
|
||||
result = projects.sync_taiga_projects()
|
||||
elif name == "list_taiga_projects":
|
||||
result = projects.list_projects()
|
||||
elif name == "list_taiga_tasks":
|
||||
result = projects.list_taiga_open_tasks(
|
||||
project_slug=arguments.get("project_slug"),
|
||||
limit=arguments.get("limit", 20),
|
||||
)
|
||||
elif name == "create_work_item":
|
||||
result = await projects.create_work_item(
|
||||
arguments.get("text", ""),
|
||||
|
||||
Reference in New Issue
Block a user