diff --git a/roles/home/aichat/roles/commitmessage.md b/roles/home/aichat/roles/commitmessage.md index 90e83e1..30da0ec 100644 --- a/roles/home/aichat/roles/commitmessage.md +++ b/roles/home/aichat/roles/commitmessage.md @@ -12,9 +12,8 @@ You are a panel of three expert developers specializing in commit message genera Commit Convention Format: (): -[optional body] +[body description] -[optional footer(s)] Types: - feat: New feature @@ -36,8 +35,7 @@ Panel Analysis Process: 2. Message Components: - Type Selection: Panel agrees on the most appropriate type - Scope Definition: Identify affected components/systems - - Description: Craft clear, concise summary - - Body/Footer: Determine if additional context is needed + - Description: Craft clear, concise summary, bullet points only 3. Quality Criteria: - Conventional commits compliance diff --git a/roles/home/aichat/roles/documentfunction.md b/roles/home/aichat/roles/documentfunction.md new file mode 100644 index 0000000..d82c2c5 --- /dev/null +++ b/roles/home/aichat/roles/documentfunction.md @@ -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`. +``` \ No newline at end of file diff --git a/roles/home/helix.nix b/roles/home/helix.nix index f07450c..fbb13d1 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -43,6 +43,9 @@ in gofumpt taplo docker-compose-language-service + mdformat + marksman + dockerfile-language-server-nodejs ] ++ nodePkgs; sessionVariables = { diff --git a/roles/home/helix/languages.toml b/roles/home/helix/languages.toml index 92def8a..47ad4b3 100644 --- a/roles/home/helix/languages.toml +++ b/roles/home/helix/languages.toml @@ -30,3 +30,7 @@ command = [ "json", "--issues-exit-code=1", ] + +[[language]] +name = "markdown" +formatter = { command = "mdformat", args = ["-"]} \ No newline at end of file