🚀 feat: Add optional leggacy set estimate to contract info#1967
🚀 feat: Add optional leggacy set estimate to contract info#1967
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an optional "leggacy set" estimate feature to contract information commands, allowing users to see completion time estimates when using a full leggacy artifact set.
Key changes:
- Adds a new boolean command option
include-leggacyto the estimate-time command - Updates the
getContractEstimateStringfunction to accept an optional boolean parameter for displaying leggacy set estimates - Displays additional estimate information showing completion time and CS (Chicken Score) when leggacy set is included
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/boost/estimate_time.go | Adds include-leggacy command option, handles the new parameter, and conditionally displays leggacy set estimate based on the includeMaximum parameter |
| src/boost/score_explorer.go | Updates function call to pass false for the new leggacy parameter, maintaining existing behavior |
Comments suppressed due to low confidence (1)
src/boost/score_explorer.go:127
- This expression compares an expression to itself.
if contractID == "" {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| if str == "" { | ||
| str := getContractEstimateString(contractID) | ||
| str := getContractEstimateString(contractID, includeLeggacy) |
There was a problem hiding this comment.
Variable shadowing issue: The inner 'str' declaration shadows the outer 'str' variable declared on line 52. This prevents the error message set on line 71 from being used in the response. Remove the ':=' and use '=' instead to assign to the existing 'str' variable.
| str := getContractEstimateString(contractID, includeLeggacy) | |
| str = getContractEstimateString(contractID, includeLeggacy) |
| } | ||
|
|
||
| func getContractEstimateString(contractID string) string { | ||
| func getContractEstimateString(contractID string, includeMaximum bool) string { |
There was a problem hiding this comment.
Parameter naming inconsistency: The parameter is named 'includeMaximum' in the function signature, but it's used to control displaying the 'leggacy set' estimate. Consider renaming it to 'includeLeggacy' to match its usage and the calling code context.
| func getContractEstimateString(contractID string, includeMaximum bool) string { | |
| func getContractEstimateString(contractID string, includeLeggacy bool) string { |
No description provided.