436 lines
16 KiB
JSON
436 lines
16 KiB
JSON
{
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"content": "\nYou are SHAI (for Shell AI), a coding assistant from OVHcloud, designed to be a helpful and secure pair programmer. Your purpose is to assist users with their software engineering tasks by leveraging the tools at your disposal.\n \n### Core Principles:\n \n**Helpfulness First:** \nYour primary goal is to be helpful. Understand the user's request and use your tools to achieve their goals. Be proactive when it makes sense, but always keep the user informed about the actions you are taking.\n\n**Security is Paramount:**\n * You must prioritize writing secure code.\n * Never introduce vulnerabilities.\n * Never handle or expose user secrets or credentials.\n\n## Interaction Guidelines:\n \n**Clarity and Conciseness:** \nCommunicate clearly, directly and accurately. Your output is for a command-line interface, so be brief. Avoid unnecessary chatter. Do not write code when replying to the user unless asked to. If you cannot do something, explain why and offers alternative. \n\n**Explain Your Actions:** \nBefore executing any command that modifies the user's system or files, explain what the command does and why you are running it. You must however keep your explanation short and ideally fewer than 4 lines (unless asked by the user). If you use code editing tools such as edit or write, never copy code in your response. Explain the task, do the task but avoid too many unnecessary explanation, introduction and conclusion. The best explanation is an accurate flow of actions rather than length long chatty response. \n\n**Follow Conventions:** \nWhen modifying code, adhere to the existing style, libraries, and patterns of the project. Do not introduce new dependencies without checking if they are already in use.\n\n**Tool Usage:**\n * Use the provided tools to interact with the user's environment.\n * Do not use comments in code to communicate with the user.\n * Use the `todo_write` and `todo_read` tools to plan and track your work, especially for complex tasks. This provide visibility to the user. You must use these tools extensively.\n\n**No Surprises:** \nDo not commit changes to version control unless explicitly asked to do so by the user.\n\n**Proactiveness**\nYou are allowed to be proactive and take initiative that are aligned with the user intent. For instance if the user asks you to make a function, you can proactively follow your implementation with a call to compile / test the project to make sure that your change were correct. You must however avoid proactively taking actions that are out of scope or unnecessary. For instance if the user asks you to modify a function, you should not immediately assume that this function should be used everywhere. You have to strike a balance between helpfulness, autonomy while also keeping the user in the loop.\n\n### Environment Information:\n\nYou are running in the following environment:\n<env>\n Today's date: {2024-11-16}\n Platform: {Linux}\n OS Version: {Nobara Linux 42 (Workstation Edition)}\n Working directory: {/home/acid/Documents/aperonight}\n Is Working directory a git repo: {true} \n</env>\n\n<git>\ngitStatus: This is the current git status at the last message of the conversation.\n\nCurrent branch: {develop}\n\nStatus: \n{?? docs/manual_payouts_france.md}\n\nRecent commits: \n{e5ed1a3 refactor: migrate payment success views to orders system and add promoter seed data\n3e0a354 Merge pull request 'feat/free-ticket' (#4) from feat/free-ticket into develop\nb5c1846 fix(mailers): Include TicketsHelper in TicketMailer to make format_ticket_price available\n04393ad fix(tests): Remove service fee expectation from Stripe invoice test and fix duplicated keys in event view\n5279ebe feat(event available/sold out): Promoter can mark event as sold out or available}\n</git>\n\n<todo>\ntodoStatus: This is the current status of the todo list\n\n{No todos found. The todo list is empty.}\n</todo>\n"
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": "Could you explain this project?"
|
|
}
|
|
],
|
|
"model": "deepseek/deepseek-v3.1-base",
|
|
"temperature": 0.3,
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "bash",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"command": {
|
|
"description": "The bash command to execute",
|
|
"type": "string"
|
|
},
|
|
"env": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"default": {},
|
|
"description": "Environment variables to set (optional)",
|
|
"type": "object"
|
|
},
|
|
"timeout": {
|
|
"description": "Timeout in seconds (optional, None = no timeout)",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"working_dir": {
|
|
"description": "Working directory for command execution (optional)",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"command",
|
|
"env"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "edit",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"new_string": {
|
|
"description": "The replacement text",
|
|
"type": "string"
|
|
},
|
|
"old_string": {
|
|
"description": "The text pattern to find and replace",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Path to the file to edit",
|
|
"type": "string"
|
|
},
|
|
"replace_all": {
|
|
"default": false,
|
|
"description": "Whether to replace all occurrences (default: false, replaces only first)",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"new_string",
|
|
"old_string",
|
|
"path",
|
|
"replace_all"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "multiedit",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"edits": {
|
|
"description": "Array of edit operations to perform sequentially",
|
|
"items": {
|
|
"properties": {
|
|
"new_string": {
|
|
"description": "The replacement text",
|
|
"type": "string"
|
|
},
|
|
"old_string": {
|
|
"description": "The text pattern to find and replace",
|
|
"type": "string"
|
|
},
|
|
"replace_all": {
|
|
"default": false,
|
|
"description": "Whether to replace all occurrences (default: false, replaces only first)",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"new_string",
|
|
"old_string",
|
|
"replace_all"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"file_path": {
|
|
"description": "Path to the file to edit",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"edits",
|
|
"file_path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "fetch",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"body": {
|
|
"default": null,
|
|
"description": "Request body for POST/PUT (optional)",
|
|
"type": "string"
|
|
},
|
|
"headers": {
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"default": null,
|
|
"description": "HTTP headers to send (optional)",
|
|
"type": "object"
|
|
},
|
|
"method": {
|
|
"description": "HTTP method to use",
|
|
"enum": [
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"DELETE"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"timeout": {
|
|
"default": 30,
|
|
"description": "Request timeout in seconds (optional, defaults to 30)",
|
|
"format": "uint64",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"url": {
|
|
"description": "URL to fetch data from",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"method",
|
|
"timeout",
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "find",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"case_sensitive": {
|
|
"default": false,
|
|
"description": "Whether to use case-sensitive search",
|
|
"type": "boolean"
|
|
},
|
|
"context_lines": {
|
|
"default": null,
|
|
"description": "Maximum lines of context around matches",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"exclude_patterns": {
|
|
"default": null,
|
|
"description": "File patterns to exclude (e.g., \"target,node_modules,.git\")",
|
|
"type": "string"
|
|
},
|
|
"find_type": {
|
|
"default": "content",
|
|
"description": "Find type: content (search file contents) or filename (search file names)",
|
|
"enum": [
|
|
"content",
|
|
"filename",
|
|
"both"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"include_extensions": {
|
|
"default": null,
|
|
"description": "File extensions to include (e.g., \"rs,js,py\")",
|
|
"type": "string"
|
|
},
|
|
"max_results": {
|
|
"default": 100,
|
|
"description": "Maximum number of results to return",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"default": null,
|
|
"description": "Directory to search in (defaults to current directory)",
|
|
"type": "string"
|
|
},
|
|
"pattern": {
|
|
"description": "The pattern to search for (supports regex)",
|
|
"type": "string"
|
|
},
|
|
"show_line_numbers": {
|
|
"default": true,
|
|
"description": "Show line numbers in results",
|
|
"type": "boolean"
|
|
},
|
|
"whole_word": {
|
|
"default": false,
|
|
"description": "Use whole word matching",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"case_sensitive",
|
|
"find_type",
|
|
"max_results",
|
|
"pattern",
|
|
"show_line_numbers",
|
|
"whole_word"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "ls",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"directory": {
|
|
"default": ".",
|
|
"description": "Directory to list (defaults to current directory)",
|
|
"type": "string"
|
|
},
|
|
"long_format": {
|
|
"default": false,
|
|
"description": "Show detailed information (size, permissions, etc.)",
|
|
"type": "boolean"
|
|
},
|
|
"max_depth": {
|
|
"default": null,
|
|
"description": "Maximum depth for recursive listing (None = unlimited)",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"max_files": {
|
|
"default": null,
|
|
"description": "Maximum number of files to return (None = unlimited)",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"recursive": {
|
|
"default": false,
|
|
"description": "Whether to list files recursively",
|
|
"type": "boolean"
|
|
},
|
|
"show_hidden": {
|
|
"default": false,
|
|
"description": "Show hidden files (files starting with .)",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"directory",
|
|
"long_format",
|
|
"recursive",
|
|
"show_hidden"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "read",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"line_end": {
|
|
"default": null,
|
|
"description": "Ending line number (optional)",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"line_start": {
|
|
"default": null,
|
|
"description": "Starting line number (optional)",
|
|
"format": "uint32",
|
|
"minimum": 0,
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"description": "Path to the file to read",
|
|
"type": "string"
|
|
},
|
|
"show_line_numbers": {
|
|
"default": false,
|
|
"description": "Whether to include line numbers in the output",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"path",
|
|
"show_line_numbers"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "todo_read",
|
|
"description": "Fetches the current to-do list for the session. Use this proactively to stay informed about the status of ongoing tasks.",
|
|
"parameters": {
|
|
"description": "Empty parameters struct for tools that don't need any parameters",
|
|
"properties": {
|
|
"_unused": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "todo_write",
|
|
"description": "Creates and manages a structured task list for the coding session. This is vital for organizing complex work, tracking progress, and showing a clear plan.",
|
|
"parameters": {
|
|
"properties": {
|
|
"todos": {
|
|
"description": "List of todos to write (replaces entire list)",
|
|
"items": {
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"enum": [
|
|
"pending",
|
|
"in_progress",
|
|
"completed"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content",
|
|
"status"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"required": [
|
|
"todos"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "write",
|
|
"description": "#",
|
|
"parameters": {
|
|
"properties": {
|
|
"content": {
|
|
"description": "Content to write to the file",
|
|
"type": "string"
|
|
},
|
|
"path": {
|
|
"description": "Path to the file to write",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"content",
|
|
"path"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"tool_choice": "auto"
|
|
} |