fix: remove unused functions and dead code to pass staticcheck
This commit is contained in:
parent
014998c61f
commit
0e546ccd7b
@ -699,7 +699,6 @@ type openClawArtifactContract struct {
|
||||
SourceMessage string
|
||||
}
|
||||
|
||||
|
||||
func openClawArtifactContractForParams(params map[string]any, chatParams map[string]any) openClawArtifactContract {
|
||||
metadata := shared.AsMap(params["metadata"])
|
||||
taskLoadClass := strings.TrimSpace(shared.StringArg(metadata, "taskLoadClass", ""))
|
||||
@ -758,6 +757,14 @@ func openClawChatSendParamsWithSessionKey(
|
||||
}
|
||||
if expectedDirs, ok := params["expectedArtifactDirs"]; ok {
|
||||
chatParams["expectedArtifactDirs"] = expectedDirs
|
||||
} else if metadata := shared.AsMap(params["metadata"]); len(metadata) > 0 {
|
||||
if expectedDirs, ok := metadata["expectedArtifactDirs"]; ok {
|
||||
chatParams["expectedArtifactDirs"] = expectedDirs
|
||||
} else if contract := shared.AsMap(metadata["xworkmateTaskArtifactContract"]); len(contract) > 0 {
|
||||
if expectedDirs, ok := contract["expectedArtifactDirs"]; ok {
|
||||
chatParams["expectedArtifactDirs"] = expectedDirs
|
||||
}
|
||||
}
|
||||
}
|
||||
attachments := openClawNonEmptyPathAttachments(params)
|
||||
inlineAttachments, rpcErr := materializeOpenClawInlineAttachments(params, turnID)
|
||||
@ -1336,7 +1343,6 @@ func applyOpenClawArtifactContractResult(result map[string]any, contract openCla
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func mergeOpenClawArtifactPayload(result map[string]any, source map[string]any) {
|
||||
if result == nil || len(source) == 0 {
|
||||
return
|
||||
|
||||
@ -616,7 +616,6 @@ func TestOpenClawAgentWaitTimeoutUsesOneHourForLongPDFImageWork(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestGatewayRequestForwardsOpenClawSkillsStatus(t *testing.T) {
|
||||
gateway := newAcpFakeOpenClawGateway(t)
|
||||
defer gateway.Close()
|
||||
@ -769,7 +768,6 @@ func TestExecuteSessionTaskGatewayNoDisplayableOutputFails(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestExecuteSessionTaskGatewayFailsArtifactContractAfterWaitFailure(t *testing.T) {
|
||||
gateway := newAcpFakeOpenClawGateway(t)
|
||||
defer gateway.Close()
|
||||
@ -950,8 +948,6 @@ func TestExecuteSessionMessageGatewayUsesOpenClawChatSend(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
func TestInternalJobsSubmitCompletesAndReportsStats(t *testing.T) {
|
||||
server := NewServer()
|
||||
providerServer := newExternalSingleAgentProvider(t, "opencode", "job-output")
|
||||
@ -2462,7 +2458,6 @@ func TestExecuteSessionTaskGatewayAlwaysSyncsGatewayArtifactsAfterRun(t *testing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func TestExtractArtifactPayloadsDoesNotScanRemoteDirectoryFallback(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
if err := os.WriteFile(filepath.Join(root, "stale.txt"), []byte("stale"), 0o644); err != nil {
|
||||
@ -3312,7 +3307,6 @@ func sameMethods(got []string, want []string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
func waitForCondition(t *testing.T, condition func() bool) {
|
||||
t.Helper()
|
||||
deadline := time.Now().Add(5 * time.Second)
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"xworkmate-bridge/internal/shared"
|
||||
"xworkmate-bridge/internal/service"
|
||||
"xworkmate-bridge/internal/shared"
|
||||
)
|
||||
|
||||
type TokenAuthHandler struct {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user