From fc5519e6d264e088b4d73ac41aaffef4efd651a3 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 15 Jan 2025 12:03:43 +0000 Subject: [PATCH 1/8] Update roles/home/helix.nix --- roles/home/helix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home/helix.nix b/roles/home/helix.nix index f07450c..d86fa66 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -43,6 +43,7 @@ in gofumpt taplo docker-compose-language-service + mdformat ] ++ nodePkgs; sessionVariables = { From 8a5300a7ccfde4813745be152bb74d4a4b4bea2c Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 15 Jan 2025 12:05:22 +0000 Subject: [PATCH 2/8] Update roles/home/helix/languages.toml --- roles/home/helix/languages.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/home/helix/languages.toml b/roles/home/helix/languages.toml index 92def8a..e3d7484 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" } \ No newline at end of file From f5d6979a8863bdc4ff2cb8f6a6053d2e0a110ae5 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 15 Jan 2025 12:05:36 +0000 Subject: [PATCH 3/8] Update roles/home/helix.nix --- roles/home/helix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home/helix.nix b/roles/home/helix.nix index d86fa66..9553fed 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -44,6 +44,7 @@ in taplo docker-compose-language-service mdformat + marksman ] ++ nodePkgs; sessionVariables = { From 8c301096ead0ce320d074538511e4c9980dae5a8 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 15 Jan 2025 12:08:25 +0000 Subject: [PATCH 4/8] Update roles/home/helix/languages.toml --- roles/home/helix/languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/home/helix/languages.toml b/roles/home/helix/languages.toml index e3d7484..47ad4b3 100644 --- a/roles/home/helix/languages.toml +++ b/roles/home/helix/languages.toml @@ -33,4 +33,4 @@ command = [ [[language]] name = "markdown" -formatter = { command = "mdformat" } \ No newline at end of file +formatter = { command = "mdformat", args = ["-"]} \ No newline at end of file From 1443282f8f28d411a60af30d6fad6cc0ae8cdcdb Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Thu, 16 Jan 2025 10:05:50 +0000 Subject: [PATCH 5/8] Update roles/home/helix.nix --- roles/home/helix.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/home/helix.nix b/roles/home/helix.nix index 9553fed..fbb13d1 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -45,6 +45,7 @@ in docker-compose-language-service mdformat marksman + dockerfile-language-server-nodejs ] ++ nodePkgs; sessionVariables = { From b9dc684c3fc9cb2900772e5223cb1f8daff7baa5 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Tue, 21 Jan 2025 17:33:31 +0000 Subject: [PATCH 6/8] Add roles/home/aichat/roles/documentfunction.md --- roles/home/aichat/roles/documentfunction.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 roles/home/aichat/roles/documentfunction.md diff --git a/roles/home/aichat/roles/documentfunction.md b/roles/home/aichat/roles/documentfunction.md new file mode 100644 index 0000000..ae1b227 --- /dev/null +++ b/roles/home/aichat/roles/documentfunction.md @@ -0,0 +1,17 @@ +// 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`. From 328dc4f7f8885a83efadaa0f26ec4dff4f481734 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Tue, 21 Jan 2025 17:37:23 +0000 Subject: [PATCH 7/8] Update roles/home/aichat/roles/documentfunction.md --- roles/home/aichat/roles/documentfunction.md | 62 ++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/roles/home/aichat/roles/documentfunction.md b/roles/home/aichat/roles/documentfunction.md index ae1b227..d82c2c5 100644 --- a/roles/home/aichat/roles/documentfunction.md +++ b/roles/home/aichat/roles/documentfunction.md @@ -1,4 +1,63 @@ -// ReplaceAllRequestParameters generates a new set of requests by replacing each parameter's value with the provided payload. +--- +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 @@ -15,3 +74,4 @@ // 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 From f1b38b4085a17d055f3f40cda11d32908e90e48c Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Wed, 22 Jan 2025 12:22:30 +0000 Subject: [PATCH 8/8] Update roles/home/aichat/roles/commitmessage.md --- roles/home/aichat/roles/commitmessage.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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