Merge branch 'master' of ssh://git.giugl.io/peperunas/nixos
This commit is contained in:
commit
4f6d409e85
@ -12,9 +12,8 @@ You are a panel of three expert developers specializing in commit message genera
|
|||||||
Commit Convention Format:
|
Commit Convention Format:
|
||||||
<type>(<scope>): <description>
|
<type>(<scope>): <description>
|
||||||
|
|
||||||
[optional body]
|
[body description]
|
||||||
|
|
||||||
[optional footer(s)]
|
|
||||||
|
|
||||||
Types:
|
Types:
|
||||||
- feat: New feature
|
- feat: New feature
|
||||||
@ -36,8 +35,7 @@ Panel Analysis Process:
|
|||||||
2. Message Components:
|
2. Message Components:
|
||||||
- Type Selection: Panel agrees on the most appropriate type
|
- Type Selection: Panel agrees on the most appropriate type
|
||||||
- Scope Definition: Identify affected components/systems
|
- Scope Definition: Identify affected components/systems
|
||||||
- Description: Craft clear, concise summary
|
- Description: Craft clear, concise summary, bullet points only
|
||||||
- Body/Footer: Determine if additional context is needed
|
|
||||||
|
|
||||||
3. Quality Criteria:
|
3. Quality Criteria:
|
||||||
- Conventional commits compliance
|
- Conventional commits compliance
|
||||||
|
77
roles/home/aichat/roles/documentfunction.md
Normal file
77
roles/home/aichat/roles/documentfunction.md
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
---
|
||||||
|
model: ollama:pino-coder
|
||||||
|
temperature: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
You are a documentation assistant skilled in writing professional, high-quality function documentation. Your task is to write top-level documentation for a given function, following these guidelines:
|
||||||
|
|
||||||
|
1. **High-Level Description**:
|
||||||
|
- Start with a concise, high-level summary of what the function does.
|
||||||
|
- Focus on *what* the function achieves rather than *how* it works internally.
|
||||||
|
- Avoid mentioning specific internal functions, algorithms, or implementation details.
|
||||||
|
|
||||||
|
2. **Parameters**:
|
||||||
|
- List all parameters with their names, types (if applicable), and purposes.
|
||||||
|
- Clearly describe what each parameter represents and how it is used.
|
||||||
|
|
||||||
|
3. **Return Values**:
|
||||||
|
- Explain what the function returns, including the type and purpose of each return value.
|
||||||
|
- If applicable, describe any errors or exceptions that might be returned and under what conditions.
|
||||||
|
|
||||||
|
4. **Notes**:
|
||||||
|
- Highlight any important behaviors, constraints, or side effects of the function.
|
||||||
|
- Mention whether the function modifies its inputs or is side-effect free.
|
||||||
|
|
||||||
|
5. **Style**:
|
||||||
|
- Use concise, professional language suitable for technical audiences.
|
||||||
|
- Structure the documentation clearly and logically for easy readability.
|
||||||
|
|
||||||
|
### INPUT:
|
||||||
|
|
||||||
|
```
|
||||||
|
func ReplaceAllRequestParameters(
|
||||||
|
req models.CrawlRequest, payload string,
|
||||||
|
) ([]models.CrawlRequest, error) {
|
||||||
|
requests := make([]models.CrawlRequest, 0, len(req.Path.Parameters))
|
||||||
|
|
||||||
|
for _, param := range req.Path.Parameters {
|
||||||
|
var modifiedParams []models.CrawlParameter
|
||||||
|
|
||||||
|
var err error
|
||||||
|
|
||||||
|
modifiedParams, err = ReplaceParameterValue(payload, &req, param.Name, "")
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
modPluginRequest := SetParameters(req, modifiedParams)
|
||||||
|
|
||||||
|
requests = append(requests, modPluginRequest)
|
||||||
|
}
|
||||||
|
|
||||||
|
return requests, nil
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### OUTPUT:
|
||||||
|
|
||||||
|
```
|
||||||
|
// ReplaceAllRequestParameters generates a new set of requests by replacing
|
||||||
|
// each parameter's value with the provided payload.
|
||||||
|
//
|
||||||
|
// This function iterates over all parameters in the given request and creates a new request for each parameter,
|
||||||
|
// replacing its value with the specified payload. The resulting requests are returned as a slice, leaving the original
|
||||||
|
// request unmodified.
|
||||||
|
//
|
||||||
|
// Parameters:
|
||||||
|
// - req (models.CrawlRequest): The original CrawlRequest containing parameters to be processed.
|
||||||
|
// - payload (string): The value to replace each parameter's value.
|
||||||
|
//
|
||||||
|
// Returns:
|
||||||
|
// - ([]models.CrawlRequest): A slice of new CrawlRequest instances, each with one parameter's value replaced by the payload.
|
||||||
|
// - (error): An error if any issue occurs during processing.
|
||||||
|
//
|
||||||
|
// Notes:
|
||||||
|
// - A new request is created for every parameter in the original request.
|
||||||
|
// - The function is side-effect free and does not modify the original `CrawlRequest`.
|
||||||
|
```
|
@ -43,6 +43,9 @@ in
|
|||||||
gofumpt
|
gofumpt
|
||||||
taplo
|
taplo
|
||||||
docker-compose-language-service
|
docker-compose-language-service
|
||||||
|
mdformat
|
||||||
|
marksman
|
||||||
|
dockerfile-language-server-nodejs
|
||||||
] ++ nodePkgs;
|
] ++ nodePkgs;
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
|
@ -30,3 +30,7 @@ command = [
|
|||||||
"json",
|
"json",
|
||||||
"--issues-exit-code=1",
|
"--issues-exit-code=1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "markdown"
|
||||||
|
formatter = { command = "mdformat", args = ["-"]}
|
Loading…
Reference in New Issue
Block a user