fix: satisfy backend lint

This commit is contained in:
kone
2026-05-17 06:45:35 +08:00
parent 3afb4afeda
commit b866c0fd27
10 changed files with 147 additions and 155 deletions
@@ -84,7 +84,7 @@ func buildKiroRequestID(resp *http.Response) string {
return strings.TrimSpace(resp.Header.Get("x-amz-request-id"))
}
func isKiroInvalidModelIDBody(respBody []byte) bool {
func isKiroInvalidModelIDBody(respBody []byte) bool { //nolint:unused // exercised by internal tests for error classification.
var payload struct {
Reason string `json:"reason"`
Message string `json:"message"`
+1 -1
View File
@@ -491,7 +491,7 @@ func buildKiroEndpoints(account *Account) []kiroEndpointConfig {
}
}
func buildKiroPayloadForAccount(ctx context.Context, account *Account, anthropicBody []byte, modelID, token, requestModel string, headers http.Header) ([]byte, error) {
func buildKiroPayloadForAccount(ctx context.Context, account *Account, anthropicBody []byte, modelID, token, requestModel string, headers http.Header) ([]byte, error) { //nolint:unused // exercised by package tests as a narrow payload helper.
result, err := buildKiroPayloadForAccountWithRepo(ctx, nil, account, anthropicBody, modelID, token, requestModel, headers)
if err != nil {
return nil, err
+3 -3
View File
@@ -357,11 +357,11 @@ func buildKiroWebSearchMCPRequest(query string) kiropkg.MCPRequest {
ID: fmt.Sprintf("web_search_%s", kiropkg.GenerateToolUseID()),
JSONRPC: "2.0",
Method: "tools/call",
Params: map[string]interface{}{
Params: map[string]any{
"name": "web_search",
"arguments": map[string]interface{}{
"arguments": map[string]any{
"query": query,
"_meta": map[string]interface{}{
"_meta": map[string]any{
"_isValid": true,
"_activePath": []string{"query"},
"_completedPaths": [][]string{{"query"}},