Ollama-0.40.10-Project-Map.csv

Download CSV ยท 4.3 MB
CSV 1559 lines 1558 data rows 30 columns 4498453 bytes
1558 rows
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA AB AC AD
Root Folder Sub-Folder Level 2 Sub-Folder Level 3 Sub-Folder Level 4 Sub-Folder Level 5 Sub-Folder Level 6 Sub-Folder Level 7 Type File Size (bytes) File Size (KB) File Size (MB) Features Summary Notes Functions Order of Operations Dependencies Data Flow / State Management Lines of Code Input Sources Output Destinations Side Effects Return Value State Mutation Cyclomatic Complexity Execution Context Error Handling Coverage API Usage Test Coverage Behaviors
folder 8192 8 0.007813
.dockerignore No extension 65 0.063477 0.000062 AnalysisAvailability{complexity:unsupported-code}; AnalysisAvailability{side-effects:unsupported-code}; AnalysisAvailability{side_effects:unsupported-code} 10 UNKNOWN
.github folder 0 0 0
.github ISSUE_TEMPLATE folder 0 0 0
.github ISSUE_TEMPLATE 10_bug_report.yml .yml 1622 1.583984 0.001547 YAML Configuration โ€” [Configuration] YAML Configuration โ€” Tags: Configuration AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} configuration graph 68 configuration data N/A (non-code) configuration/yaml N/A (data/config artifact) configuration
.github ISSUE_TEMPLATE 20_feature_request.md .md 84 0.082031 0.00008 Markdown Documentation โ€” [Configuration, Documentation, Stateless] Markdown Documentation โ€” Tags: Configuration, Documentation, Stateless AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} front matter, documentation structure 5 N/A (non-code) documentation/markdown N/A (data/config artifact) configuration, documentation, stateless
.github ISSUE_TEMPLATE 30_model_request.md .md 110 0.107422 0.000105 Markdown Documentation โ€” [Configuration, Documentation, Stateless] Markdown Documentation โ€” Tags: Configuration, Documentation, Stateless AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} front matter, documentation structure 5 N/A (non-code) documentation/markdown N/A (data/config artifact) configuration, documentation, stateless
.github ISSUE_TEMPLATE config.yml .yml 313 0.305664 0.000299 YAML Configuration โ€” [Configuration] YAML Configuration โ€” Tags: Configuration AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} https://discord.com/invite/ollama, https://github.com/ollama/ollama/blob/main/docs/faq.md configuration graph 8 configuration data N/A (non-code) configuration/yaml N/A (data/config artifact) configuration
.github scripts folder 0 0 0
.github scripts prepare_mlx_darwin.sh .sh 11584 11.3125 0.011047 Functions: cleanup, warn, read_pin, rule_inputs, wrapper_inputs โ€” [Factory Pattern, Stream Processing] Tags: Factory Pattern, Stream Processing AnalysisAvailability{side-effects:unsupported-code}; AnalysisAvailability{side_effects:unsupported-code} build_ci_payload, build_ci_sources, build_ci_xgrammar, ci_mlx_backend, cleanup, extract_payload, has_matching_payload, has_payload, payload_fingerprint, payload_inputs, read_pin, rule_inputs, save_built_payload, tag_matches_payload, tag_matches_rules, warn, wrapper_inputs cleanup -> warn -> read_pin -> rule_inputs -> wrapper_inputs 318 curl, shell input echo, print, printf, shell output SideEffects{FILE:delete} 138 automation/script not detected curl factory, streaming
.github workflows folder 4096 4 0.003906
.github workflows latest.yaml .yaml 533 0.520508 0.000508 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} docker/login-action@v3 workflow/action references, configuration graph 22 configuration data N/A (non-code) ci/workflow N/A (data/config artifact) configuration, utility
.github workflows release.yaml .yaml 37359 36.483398 0.035628 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} '-, actions/cache/restore@v4, actions/cache/save@v4, actions/setup-node@v4, al-cheb/configure-pagefile-action@v1.5, docker/build-push-action@v6, docker/metadata-action@v4 yaml anchors/aliases, workflow/action references, configuration graph 855 configuration data, referenced schema/resource echo, printf N/A (non-code) ci/workflow N/A (data/config artifact) powershell webrequest configuration, utility
.github workflows test-install.yaml .yaml 488 0.476563 0.000465 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} workflow/action references, configuration graph 20 configuration data N/A (non-code) ci/workflow N/A (data/config artifact) configuration, utility
.github workflows test-llamacpp-update.yaml .yaml 25900 25.292969 0.0247 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} '-, actions/cache/restore@v4, actions/cache/save@v4, actions/setup-node@v4, actions/upload-artifact@v4 yaml anchors/aliases, workflow/action references, configuration graph 615 configuration data, referenced schema/resource echo N/A (non-code) ci/workflow N/A (data/config artifact) powershell webrequest configuration, utility
.github workflows test-tokenizer.yaml .yaml 1174 1.146484 0.00112 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} actions/cache@v4 yaml anchors/aliases, workflow/action references, configuration graph 37 configuration data echo N/A (non-code) ci/workflow N/A (data/config artifact) configuration, utility
.github workflows test-xgrammar.yaml .yaml 3268 3.191406 0.003117 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} actions/cache@v4 yaml anchors/aliases, workflow/action references, configuration graph 72 configuration data echo N/A (non-code) ci/workflow N/A (data/config artifact) configuration, utility
.github workflows test.yaml .yaml 24269 23.700195 0.023145 YAML Configuration โ€” [Configuration, Utility] YAML Configuration โ€” Tags: Configuration, Utility AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} '-, actions/cache/restore@v4, actions/cache/save@v4, actions/cache@v4, actions/setup-go@v5 yaml anchors/aliases, workflow/action references, configuration graph 496 configuration data, referenced schema/resource echo, print N/A (non-code) ci/workflow N/A (data/config artifact) powershell webrequest configuration, utility
.golangci.yaml .yaml 1715 1.674805 0.001636 YAML Configuration โ€” [Configuration] YAML Configuration โ€” Tags: Configuration AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} yaml anchors/aliases, configuration graph 66 configuration data printf N/A (non-code) configuration/yaml N/A (data/config artifact) configuration
AGENTS.md .md 358 0.349609 0.000341 Markdown Documentation โ€” [Documentation, Stateless] Markdown Documentation โ€” Tags: Documentation, Stateless AnalysisAvailability{complexity:non-code}; AnalysisAvailability{side-effects:non-code} documentation structure 15 N/A (non-code) documentation/markdown N/A (data/config artifact) documentation, stateless
anthropic folder 0 0 0
anthropic anthropic.go .go 36046 35.201172 0.034376 Functions: NewError, UnmarshalJSON, UsageFromMetrics, intValue, FromMessagesRequest โ€” [Authentication, Database IO, Error Handling, File IO, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer] Tags: Authentication, Database IO, Error Handling, File IO, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} convertMessage, ConvertOllamaToAnthropicResults, convertTool, convertToolResultContent, countAnyContent, countContentBlock, EstimateCountTokens, EstimateInputTokens, formatWebSearchToolResultContent, FromMessagesRequest, generateID, GenerateMessageID, intValue, mapStopReason, NewError, NewStreamConverter, Process, ptr, resolveImageSource, ToMessagesResponse, UnmarshalJSON, UsageFromMetrics, WebSearch generateID -> json.Unmarshal -> json.Unmarshal -> json.Unmarshal -> max -> min -> max -> intValue -> logutil.Trace -> TraceMessagesRequest -> append -> content.WriteString -> content.Len -> append -> content.String -> convertMessage -> logutil.Trace -> append -> make -> len -> strings.HasPrefix -> strings.HasPrefix -> logutil.Trace -> TraceTool -> convertTool -> append -> len -> thinking[0].Valid -> strings.ToLower -> strings.TrimSpace -> api.ValidateLegacyThinking -> logutil.Trace -> TraceChatRequest -> strings.ToLower -> textContent.WriteString -> logutil.Trace -> errors.New -> resolveImageSource -> logutil.Trace -> append -> logutil.Trace -> errors.New -> logutil.Trace -> errors.New -> append -> convertToolResultContent -> logutil.Trace -> append -> append -> append -> formatWebSearchToolResultContent -> len -> append -> textContent.Len -> len -> len -> textContent.String -> append -> len -> append -> logutil.Trace -> len -> TraceAPIMessages -> fmt.Fprintf -> resultContent.String -> fmt.Fprintf -> resultContent.String -> json.Marshal -> string -> json.Marshal -> string -> strings.HasPrefix -> api.NewToolPropertiesMap -> props.Set -> len -> json.Unmarshal -> logutil.Trace -> fmt.Errorf -> append -> ptr -> append -> ptr -> append -> mapStopReason -> len -> UsageFromMetrics -> make -> UsageFromMetrics -> intValue -> append -> append -> append -> ptr -> append -> append -> append -> ptr -> append -> append -> append -> json.Marshal -> slog.Error -> append -> api.NewToolCallFunctionArguments -> append -> string -> append -> append -> append -> UsageFromMetrics -> mapStopReason -> len -> append -> append -> make -> rand.Read -> fmt.Sprintf -> time.Now().UnixNano -> time.Now -> fmt.Sprintf -> generateID -> fmt.Errorf -> base64.StdEncoding.DecodeString -> fmt.Errorf -> text.WriteString -> errors.New -> resolveImageSource -> append -> text.String -> EstimateCountTokens -> countAnyContent -> len -> countAnyContent -> len -> len -> len -> len -> len -> countContentBlock -> json.Marshal -> json.Unmarshal -> countContentBlock -> json.Marshal -> len -> len -> len -> json.Marshal -> len -> internalcloud.Disabled -> logutil.TraceContext -> errors.New -> internalcloud.DisabledError -> json.Marshal -> fmt.Errorf -> url.Parse -> fmt.Errorf -> logutil.TraceContext -> TraceTruncateString -> searchURL.String -> searchURL.Query -> q.Set -> strconv.FormatInt -> time.Now().Unix -> time.Now -> q.Encode -> strings.EqualFold -> searchURL.Hostname -> fmt.Sprintf -> searchURL.RequestURI -> auth.Sign -> fmt.Errorf -> logutil.TraceContext -> http.NewRequestWithContext -> searchURL.String -> bytes.NewReader -> fmt.Errorf -> req.Header.Set -> req.Header.Set -> fmt.Sprintf -> http.DefaultClient.Do -> fmt.Errorf -> resp.Body.Close -> logutil.TraceContext -> io.ReadAll -> fmt.Errorf -> string -> json.NewDecoder().Decode -> json.NewDecoder -> fmt.Errorf -> logutil.TraceContext -> len -> append bytes, context, crypto/rand, encoding/base64, encoding/json, errors, fmt, github.com/ollama/ollama/api, github.com/ollama/ollama/auth, github.com/ollama/ollama/logutil, github.com/ollama/ollama/types/model, internalcloud "github.com/ollama/ollama/internal/cloud, io, log/slog, net/http, net/url, sql:https://ollama.com/api/web_search, sql:msg, sql:req, strconv, strings, time Globals{read=[NewError, code, message, etype, http, Message, RequestID, generateID, m, data, raw, err, json, s, Text, UsageFromMetrics, metrics, total, max, cached, count, min, InputTokens, intValue, CacheReadInputTokens, OutputTokens, v, FromMessagesRequest, r, thinking, logutil, TraceMessagesRequest, messages, sys, Role, Content, content, _, block, blockMap, ok, text, i, msg, converted, convertMessage, options, tools, hasBuiltinWebSearch, t, strings, TraceTool, tool, convertTool, think, Value, effort, legacyThink, api, stream, convertedRequest, Model, Messages, Options, Tools, Think, TraceChatRequest, role, textContent, images, toolCalls, toolResults, textBlocks, imageBlocks, toolUseBlocks, toolResultBlocks, serverToolUseBlocks, webSearchToolResultBlocks, thinkingBlocks, unknownBlocks, errors, decoded, resolveImageSource, ID, Function, Name, Arguments, resultContent, resultImages, convertToolResultContent, Images, ToolCallID, formatWebSearchToolResultContent, ToolCalls, Thinking, TraceAPIMessages, c, item, fmt, itemMap, title, url, errorCode, string, props, Description, Parameters, Required, Properties, params, ToMessagesResponse, id, ptr, tc, Input, stopReason, mapStopReason, StopReason, Usage, reason, hasToolCalls, NewStreamConverter, model, estimatedInputTokens, firstWrite, toolCallsSent, events, usage, Event, Data, Index, ContentBlock, Delta, argsJSON, slog, PartialJSON, prefix, b, rand, time, GenerateMessageID, source, base64, cb, cbMap, rawSource, rawType, rawMediaType, rawData, img, EstimateInputTokens, req, EstimateCountTokens, totalLen, countAnyContent, tokens, countContentBlock, WebSearchEndpoint, WebSearch, ctx, query, maxResults, internalcloud, reqBody, Query, MaxResults, body, searchURL, TraceTruncateString, q, strconv, signature, challenge, auth, bytes, resp, respBody, io, searchResp, ConvertOllamaToAnthropicResults, ollamaResults, results, URL, Title]}; Database{reads=[https://ollama.com/api/web_search via gorm|msg via gorm|req via gorm]} 1158 database table read: https://ollama.com/api/web_search, database table read: msg, database table read: req, http request, query params, read all, request object file write, printf SideEffects{DATABASE:read; FILE:read; LOG:console; NON_DETERMINISTIC; STATE:global; STATE:instance} "" | "", nil, err | "", nil, errors.New("invalid tool_result image source") | "", nil, nil | "end_turn" | "max_tokens" | "stop_sequence" | "tool_use" | "web_search_tool_result_error" | "web_search_tool_result_error: " + c.ErrorCode | "web_search_tool_result_error: " + errorCode | &StreamConverter{ ID: id, Model: model, f... | &s | &searchResp, nil | *v | 0 | ErrorResponse{ Type: "error", Error: Error{Type: etype, Message: me... | EstimateCountTokens(CountTokensRequest{ Model: req.Model, Messages: req.M... | MessagesResponse{ ID: id, Type: "message", Role: "assi... | Usage{ InputTokens: total - intValue(cached), CacheReadInputTokens:... | api.Tool{ Type: "function", Function: api.ToolFunction{ Name: "... | api.Tool{ Type: "function", Function: api.ToolFunction{ Name: t.Na... | api.Tool{}, false, fmt.Errorf("invalid input_schema for tool %q: %w", t.Name, er... | c | c, nil, nil | convertedRequest, nil | decoded, nil | err | events | fmt.Sprintf("%s_%d", prefix, time.Now().UnixNano()) | fmt.Sprintf("%s_%x", prefix, b) | generateID("msg") | json.Unmarshal(raw.Content, &m.Content) | len(c) | len(data) | messages, nil | nil | nil, err | nil, errors.New("invalid image source") | nil, errors.New("tool_use block missing required 'id' field") | nil, errors.New("tool_use block missing required 'name' field") | nil, errors.New(internalcloud.DisabledError("web search is unavailable")) | nil, fmt.Errorf("failed to create web search request: %w", err) | nil, fmt.Errorf("failed to decode web search response: %w", err) | nil, fmt.Errorf("failed to marshal web search request: %w", err) | nil, fmt.Errorf("failed to parse web search URL: %w", err) | nil, fmt.Errorf("failed to sign web search request: %w", err) | nil, fmt.Errorf("invalid base64 image data: %w", err) | nil, fmt.Errorf("invalid image source type: %s. Only base64 images are supported... | nil, fmt.Errorf("web search request failed: %w", err) | nil, fmt.Errorf("web search returned status %d: %s", resp.StatusCode, string(res... | resultContent.String() | results | string(data) | text.String(), images, nil | tokens | total 380 go/backend present net/http, requests database, persistence
anthropic anthropic_test.go .go 57758 56.404297 0.055082 Functions: testIntPtr, textContent, makeArgs, TestUsageFromMetricsBoundsCacheReads, TestUsageCacheReadJSON โ€” [Authentication, Caching, Channels, Concurrent, Database IO, Error Handling, Event-Driven, Factory Pattern, Map/Filter/Reduce, Stateful, Stream Processing, Threads, Transformer] Tags: Authentication, Caching, Channels, Concurrent, Database IO, Error Handling, Event-Driven, Factory Pattern, Map/Filter/Reduce, Stateful, Stream Processing, Threads, Transformer Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} makeArgs, TestCitation, TestContentBlockJSON_EmptyFieldsPresent, TestContentBlockJSON_NonToolBlocksDoNotIncludeInput, TestConvertMessage_ServerToolUse, TestConvertMessage_WebSearchToolResult, TestConvertMessage_WebSearchToolResultEmptyStillCreatesToolMessage, TestConvertMessage_WebSearchToolResultErrorStillCreatesToolMessage, TestConvertOllamaToAnthropicResults, TestConvertTool_RegularTool, TestConvertTool_WebSearch, TestEstimateTokens_EmptyContent, TestEstimateTokens_SimpleMessage, TestEstimateTokens_WithSystemPrompt, TestEstimateTokens_WithThinking, TestEstimateTokens_WithTools, TestFromMessagesRequest_Basic, TestFromMessagesRequest_ClaudeAutoModeClassifierFixtures, TestFromMessagesRequest_DropsCustomWebSearchWhenBuiltinPresent, TestFromMessagesRequest_InvalidToolSchema, TestFromMessagesRequest_KeepsCustomWebSearchWhenBuiltinAbsent, TestFromMessagesRequest_ThinkingAdaptiveUsesOutputConfigEffort, TestFromMessagesRequest_ThinkingDisabledOverridesOutputConfigEffort, TestFromMessagesRequest_ThinkingOnlyBlock, TestFromMessagesRequest_ToolUseMissingID, TestFromMessagesRequest_ToolUseMissingName, TestFromMessagesRequest_WithImage, TestFromMessagesRequest_WithOptions, TestFromMessagesRequest_WithOutputConfigEffort, TestFromMessagesRequest_WithOutputConfigEffortXHighMapsToHigh, TestFromMessagesRequest_WithSystemPrompt, TestFromMessagesRequest_WithSystemPromptArray, TestFromMessagesRequest_WithThinking, TestFromMessagesRequest_WithToolResult, TestFromMessagesRequest_WithToolResultFollowedByUserText, TestFromMessagesRequest_WithToolResultImage, TestFromMessagesRequest_WithTools, TestFromMessagesRequest_WithToolUse, TestGenerateMessageID, testIntPtr, TestMapStopReason, TestNewError, TestStreamConverter_Basic, TestStreamConverter_ContentBlockStartIncludesEmptyFields, TestStreamConverter_MultipleToolCallsWithMixedValidity, TestStreamConverter_TextBeforeThinking, TestStreamConverter_ThinkingDirectlyFollowedByToolCall, TestStreamConverter_ToolCallWithUnmarshalableArgs, TestStreamConverter_WithToolCalls, TestToMessagesResponse_Basic, TestToMessagesResponse_PreservesClaudeAutoClassifierOutput, TestToMessagesResponse_WithThinking, TestToMessagesResponse_WithToolCalls, TestUsageCacheReadJSON, TestUsageFromMetricsBoundsCacheReads, TestWebSearchTypes, textContent api.NewToolCallFunctionArguments -> len -> args.Set -> testIntPtr -> testIntPtr -> testIntPtr -> testIntPtr -> t.Run -> cmp.Diff -> UsageFromMetrics -> t.Errorf -> testIntPtr -> testIntPtr -> t.Run -> json.Marshal -> UsageFromMetrics -> t.Fatal -> string -> t.Errorf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Errorf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> textContent -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> textContent -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Errorf -> t.Errorf -> t.Errorf -> cmp.Diff -> t.Errorf -> t.Run -> json.Unmarshal -> t.Fatal -> FromMessagesRequest -> t.Fatal -> t.Fatalf -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> cmp.Diff -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> t.Fatalf -> base64.StdEncoding.DecodeString -> ptr -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> len -> t.Fatalf -> len -> string -> string -> t.Error -> textContent -> makeArgs -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> base64.StdEncoding.DecodeString -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> len -> t.Fatalf -> len -> string -> string -> t.Error -> makeArgs -> ptr -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> t.Fatalf -> t.Fatalf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Fatal -> result.Think.String -> t.Fatalf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Fatal -> result.Think.String -> t.Fatalf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Fatal -> t.Fatalf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Fatal -> result.Think.String -> t.Fatalf -> textContent -> json.RawMessage -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> textContent -> json.RawMessage -> json.RawMessage -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> textContent -> json.RawMessage -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> textContent -> FromMessagesRequest -> t.Fatalf -> t.Fatal -> t.Errorf -> textContent -> ptr -> FromMessagesRequest -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> FromMessagesRequest -> t.Fatal -> err.Error -> t.Errorf -> FromMessagesRequest -> t.Fatal -> err.Error -> t.Errorf -> textContent -> json.RawMessage -> FromMessagesRequest -> t.Fatal -> testIntPtr -> ToMessagesResponse -> t.Errorf -> t.Errorf -> t.Errorf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> intValue -> t.Errorf -> json.Marshal -> t.Fatal -> strings.Contains -> string -> t.Errorf -> t.Run -> ToMessagesResponse -> len -> t.Fatalf -> t.Fatalf -> t.Fatalf -> makeArgs -> ToMessagesResponse -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> t.Errorf -> ToMessagesResponse -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> mapStopReason -> t.Errorf -> NewError -> t.Errorf -> t.Errorf -> t.Errorf -> t.Errorf -> GenerateMessageID -> GenerateMessageID -> t.Error -> t.Error -> len -> t.Errorf -> t.Errorf -> NewStreamConverter -> testIntPtr -> conv.Process -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> testIntPtr -> conv.Process -> t.Errorf -> t.Errorf -> intValue -> t.Errorf -> t.Errorf -> t.Error -> NewStreamConverter -> makeArgs -> conv.Process -> t.Error -> t.Error -> NewStreamConverter -> conv.Process -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> makeArgs -> conv.Process -> t.Error -> t.Fatal -> t.Errorf -> t.Fatal -> t.Errorf -> t.Error -> NewStreamConverter -> conv.Process -> append -> fmt.Sprintf -> append -> fmt.Sprintf -> append -> fmt.Sprintf -> append -> cmp.Diff -> t.Fatalf -> NewStreamConverter -> make -> api.NewToolCallFunctionArguments -> badArgs.Set -> conv.Process -> t.Error -> NewStreamConverter -> make -> api.NewToolCallFunctionArguments -> badArgs.Set -> makeArgs -> conv.Process -> t.Errorf -> t.Errorf -> t.Errorf -> ptr -> ptr -> ptr -> t.Run -> json.Marshal -> t.Fatalf -> json.Unmarshal -> t.Fatalf -> t.Errorf -> string -> ptr -> ptr -> t.Run -> json.Marshal -> t.Fatalf -> json.Unmarshal -> t.Fatalf -> t.Fatalf -> string -> t.Run -> NewStreamConverter -> conv.Process -> json.Marshal -> json.Unmarshal -> t.Fatalf -> t.Error -> t.Error -> t.Run -> NewStreamConverter -> conv.Process -> json.Marshal -> json.Unmarshal -> t.Error -> t.Error -> t.Run -> NewStreamConverter -> makeArgs -> conv.Process -> start.ContentBlock.Input.Len -> t.Errorf -> start.ContentBlock.Input.Len -> json.Marshal -> json.Unmarshal -> t.Error -> t.Errorf -> len -> t.Errorf -> t.Error -> textContent -> EstimateCountTokens -> t.Errorf -> t.Errorf -> textContent -> EstimateCountTokens -> t.Errorf -> textContent -> json.RawMessage -> EstimateCountTokens -> t.Errorf -> textContent -> ptr -> ptr -> EstimateCountTokens -> t.Errorf -> EstimateCountTokens -> t.Errorf -> convertTool -> t.Fatalf -> t.Error -> t.Errorf -> t.Errorf -> t.Error -> t.Fatal -> result.Function.Parameters.Properties.Get -> t.Error -> len -> t.Errorf -> json.RawMessage -> convertTool -> t.Fatalf -> t.Error -> t.Errorf -> makeArgs -> convertMessage -> t.Fatalf -> len -> t.Fatalf -> len -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> convertMessage -> t.Fatalf -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Error -> convertMessage -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> t.Fatalf -> convertMessage -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> strings.Contains -> t.Fatalf -> ConvertOllamaToAnthropicResults -> len -> t.Fatalf -> len -> t.Errorf -> t.Errorf -> t.Errorf -> json.Marshal -> t.Fatalf -> json.Unmarshal -> t.Fatalf -> t.Errorf -> json.Marshal -> t.Fatalf -> json.Unmarshal -> t.Fatalf -> t.Errorf -> json.Marshal -> t.Fatalf -> json.Unmarshal -> t.Fatalf -> t.Errorf -> t.Errorf "properties":{"location":{"type":"string"}}, "properties":{"location":{"type":"string"}}}, "properties":{"query":{"type":"string"}}, "required":["location"]}, "required":["query"]}, encoding/base64, encoding/json, fmt, github.com/google/go-cmp/cmp, github.com/ollama/ollama/api, sql:Hello, sql:hello, sql:query, sql:{"type":"invalid"}, sql:{"type":"object", sql:{"type":"object", sql:{"type":"object", strings, testing Globals{read=[testImage, testIntPtr, v, textContent, s, Text, makeArgs, kvs, args, api, i, TestUsageFromMetricsBoundsCacheReads, t, tests, name, metrics, PromptEvalCount, PromptEvalCachedCount, EvalCount, want, CacheReadInputTokens, OutputTokens, _, tt, diff, cmp, UsageFromMetrics, TestUsageCacheReadJSON, count, data, err, json, got, string, TestFromMessagesRequest_Basic, req, Model, MaxTokens, Messages, Role, Content, result, FromMessagesRequest, numPredict, ok, TestFromMessagesRequest_WithSystemPrompt, TestFromMessagesRequest_WithSystemPromptArray, TestFromMessagesRequest_WithOptions, temp, topP, topK, Temperature, TopP, TopK, StopSequences, TestFromMessagesRequest_ClaudeAutoModeClassifierFixtures, request, model, maxTokens, wantStop, wantSystem, wantUser, converted, gotStop, TestFromMessagesRequest_WithImage, imgData, base64, ptr, Source, MediaType, Data, TestFromMessagesRequest_WithToolUse, ID, Name, Input, tc, TestFromMessagesRequest_WithToolResult, ToolUseID, msg, TestFromMessagesRequest_WithToolResultImage, TestFromMessagesRequest_WithToolResultFollowedByUserText, TestFromMessagesRequest_WithOutputConfigEffort, OutputConfig, Effort, TestFromMessagesRequest_WithOutputConfigEffortXHighMapsToHigh, TestFromMessagesRequest_ThinkingDisabledOverridesOutputConfigEffort, Thinking, TestFromMessagesRequest_ThinkingAdaptiveUsesOutputConfigEffort, TestFromMessagesRequest_WithTools, Tools, Description, InputSchema, tool, TestFromMessagesRequest_DropsCustomWebSearchWhenBuiltinPresent, TestFromMessagesRequest_KeepsCustomWebSearchWhenBuiltinAbsent, TestFromMessagesRequest_WithThinking, BudgetTokens, TestFromMessagesRequest_ThinkingOnlyBlock, assistantMsg, TestFromMessagesRequest_ToolUseMissingID, TestFromMessagesRequest_ToolUseMissingName, TestFromMessagesRequest_InvalidToolSchema, TestToMessagesResponse_Basic, resp, Message, Done, DoneReason, Metrics, ToMessagesResponse, intValue, strings, TestToMessagesResponse_PreservesClaudeAutoClassifierOutput, output, TestToMessagesResponse_WithToolCalls, ToolCalls, Function, Arguments, TestToMessagesResponse_WithThinking, TestMapStopReason, mapStopReason, TestNewError, NewError, TestGenerateMessageID, id1, GenerateMessageID, id2, TestStreamConverter_Basic, conv, NewStreamConverter, resp1, events1, resp2, events2, hasStop, e, TestStreamConverter_WithToolCalls, events, hasToolStart, hasToolDelta, start, delta, TestStreamConverter_ThinkingDirectlyFollowedByToolCall, thinkingStart, thinkingStop, toolStart, toolDelta, toolStop, stop, TestStreamConverter_TextBeforeThinking, responses, response, event, fmt, TestStreamConverter_ToolCallWithUnmarshalableArgs, unmarshalable, badArgs, TestStreamConverter_MultipleToolCallsWithMixedValidity, toolStartCount, toolDeltaCount, TestContentBlockJSON_EmptyFieldsPresent, block, wantKeys, key, TestContentBlockJSON_NonToolBlocksDoNotIncludeInput, TestStreamConverter_ContentBlockStartIncludesEmptyFields, foundTextStart, cb, foundThinkingStart, foundToolStart, input, inputMap, TestEstimateTokens_SimpleMessage, tokens, EstimateCountTokens, TestEstimateTokens_WithSystemPrompt, TestEstimateTokens_WithTools, TestEstimateTokens_WithThinking, TestEstimateTokens_EmptyContent, TestConvertTool_WebSearch, MaxUses, isServerTool, convertTool, queryProp, TestConvertTool_RegularTool, TestConvertMessage_ServerToolUse, messages, convertMessage, TestConvertMessage_WebSearchToolResult, TestConvertMessage_WebSearchToolResultEmptyStillCreatesToolMessage, TestConvertMessage_WebSearchToolResultErrorStillCreatesToolMessage, TestConvertOllamaToAnthropicResults, ollamaResp, Results, Title, URL, results, ConvertOllamaToAnthropicResults, TestWebSearchTypes, EncryptedContent, PageAge, unmarshaled, errResult, ErrorCode, unmarshaledErr, TestCitation, citation, EncryptedIndex, CitedText]}; Database{reads=[Hello via gorm|hello via gorm|query via gorm|{"type":"invalid"} via gorm|{"type":"object","properties":{"location":{"type":"string"}},"required":["location"]} via gorm|{"type":"object","properties":{"location":{"type":"string"}}} via gorm|{"type":"object","properties":{"query":{"type":"string"}},"required":["query"]} via gorm]} 1931 "properties":{"location":{"type":"string"}}, "properties":{"location":{"type":"string"}}}, "properties":{"query":{"type":"string"}}, "required":["location"]}, "required":["query"]}, database table read: Hello, database table read: hello, database table read: query, database table read: {"type":"invalid"}, database table read: {"type":"object", database table read: {"type":"object", database table read: {"type":"object", stdin input file write, printf SideEffects{DATABASE:read; STATE:instance} &v | []ContentBlock{{Type: "text", Text: &s}} | args 650 go/cli present (panic/exit paths) database, persistence
anthropic thinking_test.go .go 2323 2.268555 0.002215 Functions: TestThinkingConversionMetadata โ€” [Stateful] Tags: Stateful Provenance{dependencies:language-import confidence=high} TestThinkingConversionMetadata t.Run -> json.Unmarshal -> t.Fatal -> json.Marshal -> t.Fatal -> FromMessagesRequest -> t.Fatal -> json.Marshal -> string -> string -> t.Fatalf -> t.Fatalf encoding/json, github.com/ollama/ollama/types/model, testing Globals{read=[TestThinkingConversionMetadata, t, _, metadata, Values, Default, tt, req, body, err, json, before, result, FromMessagesRequest, after, string, want, got]} 65 SideEffects{STATE:instance} 45 go/cli present (panic/exit paths) stateful
anthropic trace.go .go 9500 9.277344 0.00906 Functions: TraceTruncateString, TraceJSON, TraceCompactValue, TraceMessagesRequest, TraceMessagesResponse โ€” [Map/Filter/Reduce, Stateful, Stream Processing, Transformer] Tags: Map/Filter/Reduce, Stateful, Stream Processing, Transformer Provenance{dependencies:language-import confidence=high} ContentBlockTypes, traceAnthropicBlock, traceAnthropicContent, TraceAPIMessage, TraceAPIMessages, TraceAPITool, TraceAPITools, TraceChatRequest, TraceChatResponse, TraceCompactValue, traceImageSizes, TraceJSON, traceMessageParams, TraceMessagesRequest, TraceMessagesResponse, TraceTool, TraceToolCall, traceToolCalls, traceTools, TraceTruncateString len -> len -> fmt.Sprintf -> string -> len -> json.Marshal -> err.Error -> fmt.Sprintf -> json.Unmarshal -> TraceTruncateString -> string -> TraceCompactValue -> TraceTruncateString -> fmt.Sprintf -> len -> fmt.Sprintf -> len -> fmt.Sprintf -> TraceTruncateString -> min -> len -> make -> append -> TraceCompactValue -> len -> append -> fmt.Sprintf -> len -> make -> len -> append -> sort.Strings -> min -> len -> make -> TraceCompactValue -> len -> len -> traceMessageParams -> traceAnthropicContent -> traceTools -> TraceJSON -> TraceJSON -> ptrVal -> ptrVal -> ptrVal -> TraceJSON -> make -> len -> append -> traceAnthropicContent -> TraceTruncateString -> make -> len -> append -> TraceCompactValue -> append -> traceAnthropicBlock -> TraceJSON -> TraceTruncateString -> TraceCompactValue -> TraceTruncateString -> TraceCompactValue -> TraceCompactValue -> TraceCompactValue -> len -> fmt.Sprint -> TraceCompactValue -> make -> len -> append -> TraceTool -> TraceTruncateString -> TraceJSON -> make -> len -> append -> fmt.Sprintf -> append -> TraceAPIMessages -> TraceAPITools -> TraceJSON -> TraceAPIMessage -> TraceJSON -> make -> len -> append -> TraceAPIMessage -> TraceTruncateString -> TraceTruncateString -> traceImageSizes -> traceToolCalls -> len -> make -> len -> append -> len -> make -> len -> append -> TraceAPITool -> TraceTruncateString -> TraceJSON -> TraceJSON -> len -> make -> len -> append -> TraceToolCall encoding/json, fmt, github.com/ollama/ollama/api, sort Globals{read=[TraceMaxStringRunes, TraceMaxSliceItems, TraceMaxMapEntries, TraceMaxDepth, TraceTruncateString, s, runes, fmt, string, TraceJSON, v, data, err, json, out, TraceCompactValue, depth, t, limit, min, i, keys, k, sort, TraceMessagesRequest, r, traceMessageParams, traceAnthropicContent, traceTools, ptrVal, TraceMessagesResponse, msgs, _, m, content, c, blocks, block, blockMap, ok, traceAnthropicBlock, blockType, text, thinking, source, tools, TraceTool, ContentBlockTypes, types, T, TraceChatRequest, req, stream, TraceAPIMessages, TraceAPITools, TraceChatResponse, resp, TraceAPIMessage, traceImageSizes, traceToolCalls, images, sizes, img, TraceAPITool, TraceToolCall, tc, tcs]} 326 request object file write, print, printf SideEffects{STATE:instance} *v | TraceCompactValue(out, 0) | TraceJSON(c) | TraceTruncateString(c) | TraceTruncateString(string(data)) | TraceTruncateString(t) | blocks | fmt.Sprintf("%s...(+%d chars)", string(runes[:TraceMaxStringRunes]), len(runes)-... | fmt.Sprintf("<%T>", v) | fmt.Sprintf("<array len=%d>", len(t)) | fmt.Sprintf("<object keys=%d>", len(t)) | map[string]any{ "id": r.ID, "model": r.Model, "content": ... | map[string]any{ "id": tc.ID, "name": tc.Function.Name, "args": TraceJSON... | map[string]any{ "model": r.Model, "max_tokens": r.MaxTokens, ... | map[string]any{ "model": resp.Model, "done": resp.Done, "done... | map[string]any{ "model": req.Model, "messages": TraceAPIMessages(req.Mess... | map[string]any{ "role": m.Role, "content": TraceTruncateString(... | map[string]any{ "type": t.Type, "name": t.Name, "descripti... | map[string]any{ "type": t.Type, "name": t.Function.Name, "de... | map[string]any{"marshal_error": err.Error(), "type": fmt.Sprintf("%T", v)} | nil | out | s | sizes | t | types 79 go/cli present map/filter/reduce, stateful, streaming, transform
api folder 4096 4 0.003906
api client.go .go 16709 16.317383 0.015935 Functions: checkError, ClientFromEnvironment, NewClient, getAuthorizationToken, do โ€” [Authentication, Database IO, Error Handling, Factory Pattern, File IO, Stateful, Stream Processing, Validator] Tags: Authentication, Database IO, Error Handling, Factory Pattern, File IO, Stateful, Stream Processing, Validator Provenance{dependencies:language-import confidence=high} Chat, checkError, ClientFromEnvironment, CloudStatusExperimental, Copy, Create, CreateBlob, Delete, Disconnect, do, Embed, Embeddings, Generate, getAuthorizationToken, HeadBlob, Heartbeat, List, ListRunning, ModelRecommendationsExperimental, NewClient, Pull, Push, Show, ShowManifests, Signout, stream, SystemOne, Version, WebFetchExperimental, WebSearchExperimental, Whoami json.Unmarshal -> json.Unmarshal -> string -> envconfig.Host -> auth.Sign -> json.Marshal -> bytes.NewReader -> c.base.JoinPath -> envconfig.UseAuth -> c.base.Hostname -> strconv.FormatInt -> time.Now().Unix -> time.Now -> fmt.Sprintf -> getAuthorizationToken -> requestURL.Query -> q.Set -> q.Encode -> http.NewRequestWithContext -> requestURL.String -> request.Header.Set -> request.Header.Set -> request.Header.Set -> fmt.Sprintf -> runtime.Version -> request.Header.Set -> c.http.Do -> respObj.Body.Close -> io.ReadAll -> checkError -> len -> json.Unmarshal -> json.Marshal -> bytes.NewBuffer -> c.base.JoinPath -> envconfig.UseAuth -> c.base.Hostname -> strconv.FormatInt -> time.Now().Unix -> time.Now -> fmt.Sprintf -> getAuthorizationToken -> requestURL.Query -> q.Set -> q.Encode -> http.NewRequestWithContext -> requestURL.String -> request.Header.Set -> request.Header.Set -> request.Header.Set -> fmt.Sprintf -> runtime.Version -> request.Header.Set -> c.http.Do -> response.Body.Close -> bufio.NewScanner -> make -> scanner.Buffer -> scanner.Scan -> scanner.Bytes -> json.Unmarshal -> string -> errors.New -> string -> errors.New -> fn -> scanner.Err -> c.stream -> json.Unmarshal -> fn -> c.stream -> json.Unmarshal -> fn -> c.stream -> json.Unmarshal -> fn -> c.stream -> json.Unmarshal -> fn -> c.stream -> json.Unmarshal -> fn -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> fmt.Sprintf -> c.do -> fmt.Sprintf -> errors.As -> c.do -> c.do -> c.do -> c.do -> c.do -> c.do -> fmt.Sprintf -> c.do bufio, bytes, context, encoding/json, errors, fmt, github.com/ollama/ollama/auth, github.com/ollama/ollama/envconfig, github.com/ollama/ollama/format, github.com/ollama/ollama/version, io, net/http, net/url, runtime, strconv, time Globals{read=[checkError, resp, body, http, authError, StatusCode, json, apiError, err, string, ClientFromEnvironment, base, envconfig, NewClient, getAuthorizationToken, ctx, challenge, token, auth, c, method, path, reqData, respData, reqBody, data, bytes, requestURL, now, strconv, time, chal, fmt, q, request, version, runtime, respObj, respBody, io, maxBufferSize, format, fn, buf, bts, response, scanner, bufio, scanBuf, errorResponse, Status, ErrorMessage, errors, SigninURL, req, lr, showReq, AllManifests, digest, r, statusErr, status, encodedKey]} 471 http request, read all, request body, request object printf SideEffects{FILE:read; STATE:global; STATE:instance; NON_DETERMINISTIC} "", err | &Client{ base: base, http: http, } | &Client{ base: envconfig.Host(), http: http.DefaultClient, }, nil | &lr, nil | &resp, nil | &status, nil | AuthorizationError{ StatusCode: response.StatusCode, Status: respons... | StatusError{ StatusCode: response.StatusCode, Status: response... | StatusError{ StatusCode: response.StatusCode, Status: response.S... | apiError | authError | c.do(ctx, http.MethodDelete, fmt.Sprintf("/api/user/keys/%s", encodedKey), nil, ... | c.do(ctx, http.MethodPost, "/api/signout", nil, nil) | c.do(ctx, http.MethodPost, fmt.Sprintf("/api/blobs/%s", digest), r, nil) | c.stream(ctx, http.MethodPost, "/api/chat", req, func(bts []byte) error { var ... | c.stream(ctx, http.MethodPost, "/api/create", req, func(bts []byte) error { va... | c.stream(ctx, http.MethodPost, "/api/generate", req, func(bts []byte) error { ... | c.stream(ctx, http.MethodPost, "/api/pull", req, func(bts []byte) error { var ... | c.stream(ctx, http.MethodPost, "/api/push", req, func(bts []byte) error { var ... | err | errors.New(errorResponse.Error) | errors.New(string(bts)) | false, err | false, nil | fn(resp) | nil | nil, err | token, nil | true, nil | version.Version, nil 235 go/backend present net/http auth, database io, error handling, factory, file io, stateful, streaming, validate
api client_test.go .go 16242 15.861328 0.01549 Functions: TestClientFromEnvironment, Error, TestClientStream, TestClientStreamReportsReadErrors, TestClientDo โ€” API Endpoint Handler โ€” [API Endpoint, Database IO, Error Handling, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer] API Endpoint Handler โ€” Tags: API Endpoint, Database IO, Error Handling, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer Provenance{dependencies:language-import confidence=high} Error, Read, RoundTrip, TestClientDo, TestClientFromEnvironment, TestClientStream, TestClientStreamReportsReadErrors, TestClientWebFetchExperimentalUsesLocalRoute, TestClientWebSearchExperimentalErrors, TestClientWebSearchExperimentalUsesLocalRoute, TestHeadBlob t.Run -> t.Setenv -> ClientFromEnvironment -> t.Fatalf -> client.base.String -> t.Fatalf -> client.base.String -> t.Run -> httptest.NewServer -> http.HandlerFunc -> t.Fatal -> w.Header().Set -> w.Header -> w.WriteHeader -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatal -> fmt.Fprintln -> flusher.Flush -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatalf -> flusher.Flush -> ts.Close -> NewClient -> ts.Listener.Addr().String -> ts.Listener.Addr -> client.stream -> t.Context -> json.Unmarshal -> fmt.Errorf -> append -> t.Fatal -> strings.Contains -> err.Error -> t.Errorf -> t.Errorf -> NewClient -> roundTripFunc -> io.NopCloser -> make -> client.stream -> t.Context -> t.Fatal -> strings.Contains -> err.Error -> io.ErrUnexpectedEOF.Error -> t.Fatalf -> t.Run -> httptest.NewServer -> http.HandlerFunc -> w.WriteHeader -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatal -> fmt.Fprint -> w.Header().Set -> w.Header -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatalf -> ts.Close -> NewClient -> ts.Listener.Addr().String -> ts.Listener.Addr -> client.do -> t.Context -> t.Fatalf -> err.Error -> t.Errorf -> err.Error -> t.Errorf -> t.Errorf -> t.Fatalf -> t.Errorf -> t.Errorf -> t.Run -> NewClient -> roundTripFunc -> t.Fatalf -> t.Fatalf -> http.StatusText -> fmt.Sprintf -> io.NopCloser -> strings.NewReader -> make -> client.HeadBlob -> t.Context -> t.Fatalf -> err.Error -> t.Fatalf -> err.Error -> t.Fatalf -> t.Fatalf -> httptest.NewServer -> http.HandlerFunc -> json.NewDecoder().Decode -> json.NewDecoder -> t.Fatal -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatal -> ts.Close -> NewClient -> ts.Listener.Addr().String -> ts.Listener.Addr -> client.WebSearchExperimental -> t.Context -> t.Fatal -> t.Fatalf -> t.Fatalf -> t.Fatalf -> len -> t.Fatalf -> t.Helper -> errors.As -> t.Fatalf -> t.Fatalf -> t.Helper -> errors.As -> t.Fatalf -> t.Fatalf -> t.Run -> httptest.NewServer -> http.HandlerFunc -> w.Header().Set -> w.Header -> w.WriteHeader -> w.Write -> ts.Close -> NewClient -> ts.Listener.Addr().String -> ts.Listener.Addr -> client.WebSearchExperimental -> t.Context -> t.Fatal -> tt.assertError -> httptest.NewServer -> http.HandlerFunc -> json.NewDecoder().Decode -> json.NewDecoder -> t.Fatal -> json.NewEncoder().Encode -> json.NewEncoder -> t.Fatal -> ts.Close -> NewClient -> ts.Listener.Addr().String -> ts.Listener.Addr -> client.WebFetchExperimental -> t.Context -> t.Fatal -> t.Fatalf -> t.Fatalf -> t.Fatalf -> t.Fatalf -> f -> len -> copy encoding/json, errors, fmt, io, net/http, net/http/httptest, net/url, strings, testing Globals{read=[TestClientFromEnvironment, t, testCases, value, expect, k, v, client, err, ClientFromEnvironment, e, TestClientStream, name, responses, message, statusCode, http, wantErr, Message, Content, Done, DoneReason, _, tc, ts, httptest, w, r, flusher, ok, resp, errResp, json, fmt, NewClient, Scheme, Host, receivedChunks, chunk, strings, TestClientStreamReportsReadErrors, Transport, roundTripFunc, body, data, io, StatusCode, Status, Body, Header, TestClientDo, response, wantStatusCode, ID, Success, raw, statusErr, expectedResp, TestHeadBlob, wantExists, req, status, Request, exists, TestClientWebSearchExperimentalUsesLocalRoute, gotPath, gotMethod, gotRequest, Results, Title, URL, Query, MaxResults, TestClientWebSearchExperimentalErrors, tests, assertError, authErr, errors, tt, TestClientWebFetchExperimentalUsesLocalRoute, Links, f, p, n]} 533 file write, print, printf, stdout SideEffects{LOG:console; STATE:instance} &http.Response{ StatusCode: tc.statusCode, Status: fmt.Sprintf("... | &http.Response{ StatusCode: http.StatusOK, Status: "200 OK", Bod... | 0, r.err | e.message | f(req) | fmt.Errorf("failed to unmarshal chunk: %w", err) | n, nil | nil | void 233 go/backend present (panic/exit paths) net/http, requests api, database io, error handling, logging, map/filter/reduce, stateful, streaming, transform
api examples folder 0 0 0
api examples chat folder 0 0 0
api examples chat main.go .go 809 0.790039 0.000772 Functions: main โ€” [Logging] Tags: Logging Provenance{dependencies:language-import confidence=high} main api.ClientFromEnvironment -> log.Fatal -> context.Background -> fmt.Print -> client.Chat -> log.Fatal context, fmt, github.com/ollama/ollama/api, log Globals{read=[main, client, err, api, log, messages, Role, Content, ctx, context, req, Model, Messages, respFunc, resp, fmt]} 44 print SideEffects{LOG:console} nil 6 go/cli present logging
api examples generate folder 0 0 0
api examples generate main.go .go 654 0.638672 0.000624 Functions: main โ€” [Logging, Stream Processing] Tags: Logging, Stream Processing Provenance{dependencies:language-import confidence=high} main api.ClientFromEnvironment -> log.Fatal -> new -> context.Background -> fmt.Println -> client.Generate -> log.Fatal context, fmt, github.com/ollama/ollama/api, log Globals{read=[main, client, err, api, log, req, Model, Prompt, ctx, context, respFunc, resp, fmt]} 30 fmt println SideEffects{LOG:console} nil 6 go/cli present logging, streaming
api examples generate-streaming folder 0 0 0
api examples generate-streaming main.go .go 865 0.844727 0.000825 Functions: main โ€” [Logging, Stream Processing] Tags: Logging, Stream Processing Provenance{dependencies:language-import confidence=high} main api.ClientFromEnvironment -> log.Fatal -> context.Background -> fmt.Print -> client.Generate -> log.Fatal -> fmt.Println context, fmt, github.com/ollama/ollama/api, log Globals{read=[main, client, err, api, log, req, Model, Prompt, ctx, context, respFunc, resp, fmt]} 33 fmt println, print SideEffects{LOG:console} nil 9 go/cli present logging, streaming
api examples multimodal folder 0 0 0
api examples multimodal main.go .go 874 0.853516 0.000834 Functions: main โ€” [File IO, Logging, Stream Processing] Tags: File IO, Logging, Stream Processing Provenance{dependencies:language-import confidence=high} main len -> log.Fatal -> os.ReadFile -> log.Fatal -> api.ClientFromEnvironment -> log.Fatal -> context.Background -> fmt.Print -> client.Generate -> log.Fatal -> fmt.Println context, fmt, github.com/ollama/ollama/api, log, os Globals{read=[main, os, log, imgData, err, client, api, req, Model, Prompt, Images, ctx, context, respFunc, resp, fmt]} 39 fmt println, print SideEffects{FILE:read; LOG:console} nil 10 go/cli present file io, logging, streaming
api examples pull-progress folder 0 0 0
api examples pull-progress main.go .go 518 0.505859 0.000494 Functions: main โ€” [Logging] Tags: Logging Provenance{dependencies:language-import confidence=high} main api.ClientFromEnvironment -> log.Fatal -> context.Background -> fmt.Printf -> client.Pull -> log.Fatal context, fmt, github.com/ollama/ollama/api, log Globals{read=[main, client, err, api, log, ctx, context, req, Model, progressFunc, resp, fmt]} 25 fmt printf, printf, stdout SideEffects{LOG:console} nil 5 go/cli present logging
api examples README.md .md 380 0.371094 0.000362 Markdown Documentation โ€” [Documentation, Stateless] Markdown Documentation โ€” Tags: Documentation, Stateless AnalysisAvailability{complexity:non-code}; Provenance{dependencies:data-config-resource confidence=high}; AnalysisAvailability{side-effects:non-code} chat/main.go, generate-streaming/main.go, generate/main.go, pull-progress/main.go document links, documentation structure 12 linked document/resource N/A (non-code) documentation/markdown N/A (data/config artifact) documentation, stateless
api metrics_test.go .go 1841 1.797852 0.001756 Functions: TestMetricsCachedPromptJSON, TestMetricsSummaryCachedPromptTokens โ€” [Authentication, Caching, File IO, Stateful, Stream Processing] Tags: Authentication, Caching, File IO, Stateful, Stream Processing Provenance{dependencies:language-import confidence=high} TestMetricsCachedPromptJSON, TestMetricsSummaryCachedPromptTokens testIntPtr -> testIntPtr -> t.Run -> json.Marshal -> t.Fatal -> string -> t.Errorf -> json.Unmarshal -> t.Fatal -> t.Errorf -> t.Errorf -> os.Pipe -> t.Fatal -> t.Cleanup -> (&Metrics{ PromptEvalCount: 10, PromptEvalCachedCount: testIntPtr(4), PromptEvalDuration: time.Second, }).Summary -> testIntPtr -> write.Close -> io.ReadAll -> t.Fatal -> strings.Contains -> string -> t.Errorf encoding/json, io, os, strings, testing, time Globals{read=[TestMetricsCachedPromptJSON, t, tests, name, want, count, testIntPtr, _, tt, data, err, json, PromptEvalCachedCount, got, string, metrics, TestMetricsSummaryCachedPromptTokens, read, write, os, original, PromptEvalCount, PromptEvalDuration, time, output, io, strings]} 67 read all SideEffects{FILE:read; STATE:instance} 25 go/cli present auth, caching, file io, stateful, streaming
api types.go .go 44562 43.517578 0.042498 Functions: Error, String, UnmarshalJSON, NewToolCallFunctionArguments, Get โ€” [Database IO, Error Handling, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer, Validator] Tags: Database IO, Error Handling, Logging, Map/Filter/Reduce, Stateful, Stream Processing, Transformer, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} All, DefaultOptions, Error, FormatParams, FromMap, Get, Len, mapToTypeScriptType, MarshalJSON, NewToolCallFunctionArguments, NewToolPropertiesMap, Set, String, Summary, ToMap, ToTypeScriptType, UnmarshalJSON, ValidateLegacyThinking fmt.Sprintf -> json.Marshal -> string -> json.Marshal -> string -> json.Unmarshal -> Message -> strings.ToLower -> orderedmap.New -> t.om.Get -> orderedmap.New -> t.om.Set -> t.om.Len -> t.om.All -> t.om.ToMap -> json.Marshal -> string -> orderedmap.New -> json.Unmarshal -> json.Marshal -> json.Unmarshal -> json.Unmarshal -> len -> json.Marshal -> json.Marshal -> len -> len -> fmt.Sprintf -> orderedmap.New -> t.om.Get -> orderedmap.New -> t.om.Set -> t.om.Len -> t.om.All -> t.om.ToMap -> json.Marshal -> orderedmap.New -> json.Unmarshal -> len -> append -> anyOf.ToTypeScriptType -> strings.Join -> len -> len -> mapToTypeScriptType -> append -> mapToTypeScriptType -> strings.Join -> json.Marshal -> string -> json.Marshal -> string -> fmt.Fprintf -> fmt.Fprintf -> fmt.Fprintf -> fmt.Fprintf -> fmt.Fprintf -> max -> fmt.Fprintf -> float64 -> m.PromptEvalDuration.Seconds -> fmt.Fprintf -> fmt.Fprintf -> fmt.Fprintf -> float64 -> m.EvalDuration.Seconds -> reflect.ValueOf().Elem -> reflect.ValueOf -> reflect.TypeOf().Elem -> reflect.TypeOf -> make -> reflect.VisibleFields -> strings.Split -> field.Tag.Get -> slog.Warn -> valueOpts.FieldByName -> field.IsValid -> field.CanSet -> field.Kind -> field.SetInt -> field.SetInt -> int64 -> fmt.Errorf -> fmt.Errorf -> field.SetBool -> fmt.Errorf -> field.SetFloat -> fmt.Errorf -> field.SetString -> fmt.Errorf -> make -> len -> fmt.Errorf -> field.Set -> reflect.ValueOf -> field.Type().Elem().Kind -> field.Type().Elem -> field.Type -> fmt.Errorf -> field.Set -> reflect.ValueOf -> int -> int -> fmt.Errorf -> field.Set -> reflect.ValueOf -> fmt.Errorf -> field.Kind -> field.Type -> fmt.Errorf -> field.Kind -> int -> envconfig.ContextLength -> think.IsString -> think.String -> fmt.Errorf -> think.String -> d.Duration.String -> json.Unmarshal -> time.Duration -> time.Duration -> float64 -> time.ParseDuration -> time.Duration -> fmt.Errorf -> reflect.TypeOf -> reflect.ValueOf().Elem -> reflect.ValueOf -> reflect.TypeOf -> make -> reflect.VisibleFields -> strings.Split -> field.Tag.Get -> make -> fmt.Errorf -> valueOpts.FieldByName -> field.IsValid -> field.CanSet -> field.Kind -> strconv.ParseFloat -> fmt.Errorf -> float32 -> strconv.ParseInt -> fmt.Errorf -> strconv.ParseBool -> fmt.Errorf -> field.Type().Elem().Kind -> field.Type().Elem -> field.Type -> strconv.ParseBool -> fmt.Errorf -> strconv.ParseInt -> fmt.Errorf -> fmt.Errorf -> field.Kind -> fmt.Errorf -> field.Kind encoding/json, fmt, github.com/google/uuid, github.com/ollama/ollama/envconfig, github.com/ollama/ollama/internal/orderedmap, github.com/ollama/ollama/types/model, iter, log/slog, math, os, reflect, sql:-1, sql:json, sql:null, sql:{}, strconv, strings, time Globals{read=[e, fmt, t, bts, _, json, string, m, b, a, err, Message, strings, NewToolCallFunctionArguments, om, orderedmap, key, value, yield, data, pt, s, NewToolPropertiesMap, tp, types, anyOf, mapToTypeScriptType, jsonType, os, cached, uncached, max, float64, opts, valueOpts, reflect, typeOpts, jsonOpts, field, jsonTag, val, opt, ok, slog, int64, slice, i, item, DefaultOptions, NumPredict, NumKeep, Temperature, TopK, TopP, TypicalP, RepeatLastN, RepeatPenalty, PresencePenalty, FrequencyPenalty, Seed, Runner, NumCtx, envconfig, NumBatch, NumGPU, NumThread, DraftNumPredict, UseMMap, ValidateLegacyThinking, think, d, v, time, math, FormatParams, params, out, vals, floatVal, strconv, float32, intVal, boolVal]}; Database{reads=[-1 via gorm|json via gorm|null via gorm|{} via gorm]} 1154 database table read: -1, database table read: json, database table read: null, database table read: {}, request params, requests file write, printf SideEffects{DATABASE:read; LOG:console; STATE:instance} "" | "Record<string, any>" | "any" | "any[]" | "boolean" | "null" | "number" | "something went wrong, please see the ollama server logs for details" | "string" | "{}" | &ToolPropertiesMap{om: orderedmap.New[string, ToolProperty]()} | 0 | Options{ // options set on request to runner NumPredict: -1, // set a min... | ToolCallFunctionArguments{om: orderedmap.New[string, any]()} | ToolProperty{}, false | []byte("-1"), nil | []byte("\"" + d.Duration.String() + "\""), nil | []byte("null"), nil | []byte("{}"), nil | e.ErrorMessage | e.Status | err | fmt.Errorf("Unsupported type: '%s'", reflect.TypeOf(v)) | fmt.Errorf("invalid think value: %q (must be \"high\", \"medium\", \"low\", \"ma... | fmt.Errorf("option %q must be of an array of strings", key) | fmt.Errorf("option %q must be of type array", key) | fmt.Errorf("option %q must be of type boolean", key) | fmt.Errorf("option %q must be of type float32", key) | fmt.Errorf("option %q must be of type integer", key) | fmt.Errorf("option %q must be of type string", key) | fmt.Errorf("unknown type loading config params: %v %v", field.Kind(), field.Type... | fmt.Errorf("unknown type loading config params: %v", field.Kind()) | fmt.Sprintf("%s: %s", e.Status, e.ErrorMessage) | fmt.Sprintf("%v", []string(pt)) | func(yield func(string, ToolProperty) bool) {} | func(yield func(string, any) bool) {} | json.Marshal([]string(pt)) | json.Marshal(pt[0]) | json.Marshal(t.om) | json.Unmarshal(data, t.om) | mapToTypeScriptType(tp.Type[0]) | nil | nil, false | nil, fmt.Errorf("invalid bool value %s", vals) | nil, fmt.Errorf("invalid float value %s", vals) | nil, fmt.Errorf("invalid int value %s", vals) | nil, fmt.Errorf("unknown parameter '%s'", key) | nil, fmt.Errorf("unknown type %s for %s", field.Kind(), key) | out, nil | pt[0] | string(bts) | strings.Join(types, " | ") | t.om.All() | t.om.Get(key) | t.om.Len() | t.om.ToMap() | void 451 go/cli present requests database, persistence
api types_test.go .go 25134 24.544922 0.02397 Functions: testPropsMap, testIntPtr, testArgs, TestKeepAliveParsingFromJSON, TestDurationMarshalUnmarshal โ€” Parser & Transformer โ€” [Map/Filter/Reduce, Parser, Serializer, Stateful, Transformer, Validator] Parser & Transformer โ€” Tags: Map/Filter/Reduce, Parser, Serializer, Stateful, Transformer, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} testArgs, TestDurationMarshalUnmarshal, TestGenerationDefaultMappingsAreOptions, testIntPtr, TestKeepAliveParsingFromJSON, TestMainGPUFormatParams, TestMainGPUParsingFromJSON, TestMessage_UnmarshalJSON, TestPropertyType_MarshalJSON, TestPropertyType_UnmarshalJSON, testPropsMap, TestThinking_UnmarshalJSON, TestThinkValueTransportTypes, TestToolCallFunction_IndexAlwaysMarshals, TestToolCallFunctionArguments_ComplexValues, TestToolCallFunctionArguments_OrderPreservation, TestToolFunction_UnmarshalJSON, TestToolFunctionParameters_MarshalJSON, TestToolFunctionParameters_String, TestToolPropertiesMap_NestedProperties, TestToolPropertiesMap_OrderPreservation, TestToolPropertyNestedProperties, TestUseMmapFormatParams, TestUseMmapParsingFromJSON, TestValidateLegacyThinking NewToolPropertiesMap -> props.Set -> NewToolCallFunctionArguments -> args.Set -> t.Run -> json.Unmarshal -> require.NoError -> assert.Equal -> time.Duration -> time.Duration -> time.Duration -> time.Duration -> time.Duration -> time.Duration -> t.Run -> json.Marshal -> require.NoError -> json.Unmarshal -> require.NoError -> assert.Equal -> string -> t.Run -> json.Unmarshal -> require.NoError -> DefaultOptions -> opts.FromMap -> require.NoError -> assert.Equal -> testIntPtr -> testIntPtr -> t.Run -> json.Unmarshal -> require.NoError -> DefaultOptions -> opts.FromMap -> require.NoError -> assert.Nil -> assert.NotNil -> assert.Equal -> make -> reflect.VisibleFields -> reflect.TypeOf -> strings.Split -> field.Tag.Get -> model.GenerationDefaultOptions -> t.Fatalf -> errors.New -> t.Run -> FormatParams -> require.Equal -> assert.True -> assert.Equal -> FormatParams -> require.NoError -> assert.Equal -> int64 -> json.Unmarshal -> t.Errorf -> t.Errorf -> t.Run -> json.Unmarshal -> require.Error -> assert.Contains -> err.Error -> require.NoError -> testPropsMap -> testPropsMap -> t.Run -> json.Marshal -> require.NoError -> assert.Equal -> string -> testArgs -> json.Marshal -> require.NoError -> require.NoError -> json.Unmarshal -> require.Contains -> assert.Equal -> float64 -> json.Marshal -> require.NoError -> require.NoError -> json.Unmarshal -> require.Contains -> assert.Equal -> float64 -> t.Run -> json.Unmarshal -> t.Errorf -> len -> len -> t.Errorf -> len -> len -> t.Errorf -> t.Run -> json.Marshal -> t.Errorf -> string -> t.Errorf -> string -> t.Run -> json.Unmarshal -> require.Error -> require.NoError -> assert.Nil -> require.NotNil -> assert.Equal -> testPropsMap -> testPropsMap -> testPropsMap -> testPropsMap -> t.Run -> json.Unmarshal -> require.NoError -> json.Marshal -> require.NoError -> json.Marshal -> require.NoError -> assert.JSONEq -> string -> string -> json.Marshal -> require.NoError -> json.Unmarshal -> require.NoError -> json.Marshal -> require.NoError -> assert.JSONEq -> string -> string -> testPropsMap -> testPropsMap -> t.Run -> test.params.String -> assert.Equal -> t.Run -> NewToolCallFunctionArguments -> args.Set -> args.Set -> args.Set -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> json.Unmarshal -> require.NoError -> args.All -> append -> assert.Equal -> t.Run -> json.Unmarshal -> require.NoError -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> NewToolCallFunctionArguments -> args.Set -> args.Set -> args.Set -> assert.Equal -> args.String -> t.Run -> NewToolCallFunctionArguments -> args.Set -> args.Set -> args.Get -> assert.True -> assert.Equal -> args.Get -> assert.True -> assert.Equal -> args.Get -> assert.False -> t.Run -> NewToolCallFunctionArguments -> assert.Equal -> args.Len -> args.Set -> assert.Equal -> args.Len -> args.Set -> assert.Equal -> args.Len -> t.Run -> NewToolCallFunctionArguments -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> assert.Equal -> args.String -> t.Run -> NewToolPropertiesMap -> props.Set -> props.Set -> props.Set -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> json.Unmarshal -> require.NoError -> props.All -> append -> assert.Equal -> t.Run -> json.Unmarshal -> require.NoError -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> NewToolPropertiesMap -> props.Set -> props.Set -> props.Get -> assert.True -> assert.Equal -> props.Get -> assert.True -> assert.Equal -> props.Get -> assert.False -> t.Run -> NewToolPropertiesMap -> assert.Equal -> props.Len -> props.Set -> assert.Equal -> props.Len -> props.Set -> assert.Equal -> props.Len -> t.Run -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> NewToolPropertiesMap -> props.Set -> props.Set -> props.ToMap -> assert.Equal -> len -> assert.Equal -> assert.Equal -> t.Run -> json.Unmarshal -> require.NoError -> args.All -> append -> assert.Equal -> t.Run -> NewToolCallFunctionArguments -> args.Set -> args.Set -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> NewToolPropertiesMap -> NewToolPropertiesMap -> nestedProps.Set -> nestedProps.Set -> props.Set -> json.Marshal -> require.NoError -> assert.Equal -> string -> t.Run -> json.Unmarshal -> t.Fatal -> think.IsValid -> t.Fatal -> ValidateLegacyThinking -> t.Fatalf -> t.Run -> json.Unmarshal -> t.Fatalf -> t.Fatalf -> think.IsString -> think.Bool -> t.Fatal encoding/json, errors, github.com/ollama/ollama/types/model, github.com/stretchr/testify/assert, github.com/stretchr/testify/require, math, reflect, sql:age, sql:json, sql:key1, sql:key2, sql:name, sql:nonexistent, strings, testing, time Globals{read=[testPropsMap, m, props, NewToolPropertiesMap, k, v, testIntPtr, testArgs, args, NewToolCallFunctionArguments, TestKeepAliveParsingFromJSON, t, tests, name, req, exp, time, math, _, test, dec, err, json, assert, TestDurationMarshalUnmarshal, b, d, string, TestUseMmapParsingFromJSON, tr, fa, oMap, opts, DefaultOptions, TestMainGPUParsingFromJSON, wantGPU, TestGenerationDefaultMappingsAreOptions, jsonOpts, field, reflect, jsonTag, strings, option, model, ok, TestUseMmapFormatParams, errors, resp, FormatParams, respVal, TestMainGPUFormatParams, int64, TestMessage_UnmarshalJSON, msg, TestToolFunction_UnmarshalJSON, input, wantErr, tt, tf, TestToolFunctionParameters_MarshalJSON, Required, Properties, expected, data, TestToolCallFunction_IndexAlwaysMarshals, fn, Name, Arguments, raw, float64, TestPropertyType_UnmarshalJSON, pt, i, TestPropertyType_MarshalJSON, TestThinking_UnmarshalJSON, expectedThinking, Value, TestToolPropertyNestedProperties, Description, prop, expectedJSON, actualJSON, prop2, prop2JSON, TestToolFunctionParameters_String, params, Defs, s, result, TestToolCallFunctionArguments_OrderPreservation, jsonData, keys, original, TestToolPropertiesMap_OrderPreservation, TestToolCallFunctionArguments_ComplexValues, TestToolPropertiesMap_NestedProperties, nestedProps, TestValidateLegacyThinking, think, ValidateLegacyThinking, TestThinkValueTransportTypes]}; Database{reads=[age via gorm|json via gorm|key1 via gorm|key2 via gorm|name via gorm|nonexistent via gorm]} 950 database table read: age, database table read: json, database table read: key1, database table read: key2, database table read: name, database table read: nonexistent file write SideEffects{DATABASE:read; STATE:instance} &v | args | props | s | void 190 go/cli present (panic/exit paths) database, persistence
api types_typescript_test.go .go 2768 2.703125 0.00264 Functions: TestToolParameterToTypeScriptType โ€” [Pure, Stateless] Tags: Pure, Stateless Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} TestToolParameterToTypeScriptType t.Run -> tt.param.ToTypeScriptType -> t.Errorf sql:testing, testing Globals{read=[TestToolParameterToTypeScriptType, t, tests, name, param, expected, AnyOf, _, tt, result]}; Database{reads=[testing via gorm]} 139 database table read: testing SideEffects{DATABASE:read} 8 go/cli not detected database, persistence
app folder 4096 4 0.003906
app assets folder 0 0 0
app assets assets.go .go 264 0.257813 0.000252 Functions: ListIcons, GetIcon โ€” [Pure, Stateless] Tags: Pure, Stateless Provenance{dependencies:language-import confidence=high} GetIcon, ListIcons fs.Glob -> icons.ReadFile embed, io/fs Globals{read=[icons, ListIcons, fs, GetIcon, filename]} 14 PURE fs.Glob(icons, "*") | icons.ReadFile(filename) 5 go/cli not detected pure, stateless
app auth folder 0 0 0
app auth connect.go .go 634 0.619141 0.000605 Functions: BuildConnectURL โ€” [Database IO, Factory Pattern, Logging, Stateful] Tags: Database IO, Factory Pattern, Logging, Stateful Provenance{dependencies:language-import confidence=high} BuildConnectURL auth.GetPublicKey -> fmt.Errorf -> base64.RawURLEncoding.EncodeToString -> os.Hostname -> url.QueryEscape -> fmt.Sprintf encoding/base64, fmt, github.com/ollama/ollama/auth, net/url, os Globals{read=[BuildConnectURL, baseURL, pubKey, err, auth, fmt, encodedKey, base64, hostname, _, os, encodedDevice, url]} 20 printf SideEffects{LOG:console; STATE:global} "", fmt.Errorf("failed to get public key: %w", err) | fmt.Sprintf("%s/connect?name=%s&key=%s&launch=true", baseURL, encodedDevice, enc... 8 go/cli present database io, factory, logging, stateful
app cmd folder 0 0 0
app cmd app folder 4096 4 0.003906
app cmd app app.go .go 15839 15.467773 0.015105 Functions: main, shouldShowOnboarding, runInitialWindowsUI, startHiddenTasks, checkUserLoggedIn โ€” Parser โ€” [Channels, Concurrent, Database IO, Error Handling, Event-Driven, File IO, Logging, Network IO, Parser, Stateful, Threads, Validator] Parser โ€” Tags: Channels, Concurrent, Database IO, Error Handling, Event-Driven, File IO, Logging, Network IO, Parser, Stateful, Threads, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} checkUserLoggedIn, dispatchURLSchemeRequest, handleConnectURLScheme, handleURLSchemeInCurrentInstance, main, openInBrowser, parseURLScheme, runInitialWindowsUI, shouldShowOnboarding, startHiddenTasks strings.EqualFold -> os.Getenv -> os.Getenv -> len -> strings.HasPrefix -> slog.Info -> fmt.Fprintln -> os.Exit -> fmt.Println -> os.Exit -> fmt.Fprintln -> runInBackground -> os.Exit -> logrotate.Rotate -> os.Stat -> filepath.Dir -> errors.Is -> os.MkdirAll -> filepath.Dir -> slog.Error -> fmt.Sprintf -> os.OpenFile -> slog.Error -> fmt.Sprintf -> os.Stderr.Fd -> io.MultiWriter -> slog.NewTextHandler -> attr.Value.Any -> filepath.Base -> slog.SetDefault -> slog.New -> logStartup -> slog.Debug -> checkAndHandleExistingInstance -> os.Stat -> slog.Debug -> updater.DoPostUpgradeCleanup -> slog.Error -> maybeMoveAndRestart -> handleExistingInstance -> installSymlink -> net.Listen -> net.Listen -> slog.Error -> ln.Addr -> uuid.NewString -> strings.TrimSpace -> os.Getenv -> slog.Debug -> os.Setenv -> net.DialTimeout -> conn.Close -> slog.Error -> fmt.Fprintln -> fmt.Fprintln -> os.Exit -> tools.NewRegistry -> slog.Info -> len -> toolRegistry.List -> context.WithCancel -> context.Background -> context.WithCancel -> make -> server.New -> slog.Info -> osrv.Run -> ocancel -> context.WithCancel -> osrv.Run -> desktopModelSettingsHandler -> slog.Default -> UpdateAvailable -> uiServer.Handler -> slog.Info -> slog.Debug -> srv.Serve -> errors.Is -> slog.Warn -> slog.Debug -> upd.StartBackgroundUpdaterChecker -> updater.IsUpdatePending -> slog.Debug -> slog.Debug -> UpdateAvailable -> st.HasCompletedFirstRun -> slog.Error -> st.SetHasCompletedFirstRun -> slog.Error -> make -> signal.Notify -> slog.Info -> quit -> handleURLSchemeInCurrentInstance -> slog.Debug -> slog.Debug -> ui.WaitForServer -> slog.Warn -> uiServer.UserData -> slog.Warn -> st.Settings -> shouldShowOnboarding -> slog.Error -> osRun -> slog.Info -> srv.Close -> slog.Warn -> slog.Info -> cancel -> handleURLFn -> startHiddenFn -> showUIFn -> showUIFn -> updater.IsUpdatePending -> slog.Info -> appStore.Settings -> slog.Warn -> slog.Info -> UpdateAvailable -> updater.DoUpgradeAtStartup -> slog.Info -> UpdateAvailable -> slog.Debug -> LaunchNewApp -> os.Exit -> slog.Debug -> http.Post -> fmt.Sprintf -> slog.Debug -> resp.Body.Close -> slog.Debug -> json.NewDecoder().Decode -> json.NewDecoder -> slog.Debug -> slog.Debug -> slog.Debug -> checkUserLoggedIn -> slog.Info -> openUI -> auth.BuildConnectURL -> slog.Error -> openInBrowser -> openInBrowser -> slog.Warn -> slog.Info -> exec.Command().Start -> exec.Command -> slog.Error -> url.Parse -> fmt.Errorf -> strings.TrimPrefix -> strings.TrimPrefix -> fmt.Errorf -> dispatchURLSchemeRequest -> openUI -> slog.Error -> parseURLScheme -> connect -> apps -> open context, encoding/json, errors, fmt, github.com/google/uuid, github.com/ollama/ollama/app/auth, github.com/ollama/ollama/app/logrotate, github.com/ollama/ollama/app/server, github.com/ollama/ollama/app/store, github.com/ollama/ollama/app/tools, github.com/ollama/ollama/app/ui, github.com/ollama/ollama/app/updater, github.com/ollama/ollama/app/version, io, log/slog, net, net/http, net/url, os, os/exec, os/signal, path/filepath, runtime, sql:/, sql:/connect, sql:https://ollama.com, sql:https://ollama.com/connect, sql:OLLAMA_APP_DB_PATH, sql:OLLAMA_DEBUG, strings, syscall, time Globals{read=[wv, uiServerPort, appStore, debug, strings, os, fastStartup, devMode, CannotMove, UserDeclinedMove, MoveCompleted, AlreadyMoved, LoginSession, PermissionDenied, MoveError, main, startHidden, urlSchemeRequest, _, arg, slog, fmt, version, runInBackground, level, logrotate, appLogPath, err, filepath, errors, logFile, io, handler, Level, AddSource, ReplaceAttr, attr, source, logStartup, runtime, checkAndHandleExistingInstance, skipMove, updater, maybeMoveAndRestart, handleExistingInstance, installSymlink, ln, net, port, token, uuid, st, dbPath, conn, addr, time, toolRegistry, tools, ctx, cancel, context, octx, ocancel, done, osrv, server, upd, Store, uiServer, Token, Restart, IntegrationModels, desktopModelSettingsHandler, ToolRegistry, Dev, Logger, Updater, UpdateAvailableFunc, UpdateAvailable, srv, Handler, http, hasCompletedFirstRun, signals, signal, syscall, quit, handleURLSchemeInCurrentInstance, ui, settings, settingsErr, showOnboarding, shouldShowOnboarding, osRun, store, runInitialWindowsUI, startHiddenFn, handleURLFn, showUIFn, startHiddenTasks, LaunchNewApp, checkUserLoggedIn, resp, user, json, handleConnectURLScheme, openUI, connectURL, auth, openInBrowser, url, cmd, args, exec, parseURLScheme, action, parsedURL, dispatchURLSchemeRequest, openAppsUI, connect, open, apps]}; Database{reads=[/ via gorm|/connect via gorm|https://ollama.com via gorm|https://ollama.com/connect via gorm|OLLAMA_APP_DB_PATH via gorm|OLLAMA_DEBUG via gorm]} 488 database table read: /, database table read: /connect, database table read: https://ollama.com, database table read: https://ollama.com/connect, database table read: OLLAMA_APP_DB_PATH, database table read: OLLAMA_DEBUG, file open, http post fmt println, printf, stdout SideEffects{CONFIG; CONFIG:process.env; DATABASE:read; FILE:read; FILE:write; LOG:console; NETWORK; STATE:global; STATE:module} "", fmt.Errorf("invalid URL: %w", err) | "", fmt.Errorf("unsupported ollama:// URL path: %s", urlSchemeRequest) | "", nil | "apps", nil | "connect", nil | attr | err | err != nil || settings.OnboardingVersion < store.CurrentOnboardingVersion | false | nil | true | void 290 go/backend present http post, net/http, requests database, persistence
app cmd app AppDelegate.h .h 160 0.15625 0.000153 C-family C: recovered-header; parse-recovered; ambiguous-C-fallback; AnalysisAvailability{side-effects:parse-recovered}; AnalysisAvailability{side_effects:parse-recovered}; C-family side_effects unavailable: Side effects unavailable: parse-recovered; purity unproven Globals{read=[AppDelegate, NSObject, NSApplicationDelegate, applicationDidFinishLaunching, NSNotification, aNotification, end]} 4 UNKNOWN 1 unknown not detected
app cmd app app_darwin.go .go 64090 62.587891 0.061121 Functions: StartUI, ShowUI, IsOnboardingActive, openUI, openAppsUI โ€” [Channels, Concurrent, Database IO, Error Handling, Event-Driven, File IO, Logging, MVC, Map/Filter/Reduce, Stateful, Threads, Transformer, Validator] Tags: Channels, Concurrent, Database IO, Error Handling, Event-Driven, File IO, Logging, MVC, Map/Filter/Reduce, Stateful, Threads, Transformer, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} activeClaudeDesktopModels, allClaudeDesktopModelsLocal, applyClaudeDesktopMappings, applyClaudeDesktopMappingsWithOpen, checkAndHandleExistingInstance, claudeDesktopConnectionStatus, claudeDesktopConnectionSummary, claudeDesktopDownloadEndpoint, ClaudeDesktopDownloadRequest, claudeDesktopInstallResultFromCode, claudeDesktopModelsSupportAutoMode, claudeDesktopModelSupportsAutoMode, claudeDesktopRequestCount, ClaudeGatewayErrorMessage, claudeGatewayPort, ClaudeGatewayPort, ClaudeGatewayPortConflict, claudeGatewayPortConflict, ClaudeGatewayStartFailed, claudeGatewayStartFailed, claudeLocalModels, clearClaudeProxyFailure, codexDesktopInstallResultFromCode, CodexDesktopRequestCount, configuredClaudeDesktopModels, continueAfterBarrierError, currentClaudeDesktopAccessState, currentClaudeDesktopCloudModels, currentClaudeDesktopLocalModels, darwinAppProcessRunning, darwinOtherOllamaProcesses, darwinProcessIdentityForPID, darwinStartHiddenTasks, doubleClick, drag, effectiveClaudeDesktopAutoMode, ensureClaudeDesktopModelsAvailable, fallbackClaudeDesktopModels, getClaudeDesktopConnectionStatus, getClaudeDesktopConnectionSummary, getShowAppsInMenu, handleConnectURL, handleExistingInstance, hasCloudClaudeDesktopModel, hasExplicitCloudClaudeDesktopModelName, hasUsedClaudeDesktopIntegration, HasUsedClaudeDesktopIntegration, hideWindow, includeSelectedClaudeDesktopModels, init, InstallClaudeDesktopArchive, InstallCodexDesktopDiskImage, installSymlink, IsClaudeDesktopInstalled, IsClaudeDesktopRunning, IsClaudeGatewayConfigured, IsCodexDesktopConnected, IsCodexDesktopInstalled, IsCodexDesktopRunning, IsOnboardingActive, LaunchNewApp, loadClaudeDesktopModels, logStartup, mapKnownClaudeDesktopModels, markClaudeDesktopIntegrationUsed, maybeMoveAndRestart, mergeClaudeDesktopCloudInventory, newSignedOllamaRequest, openAppsUI, openClaudeDesktopApplication, openUI, osRun, prepareClaudeDesktopConnection, quit, quitForHandoff, reconcileClaudeAppProxy, recordClaudeProxyFailure, refreshClaudeDesktopCatalog, RefreshClaudeProxyMenu, registerLaunchAgent, requestClaudeDesktopInstall, requestCodexDesktopInstall, resetClaudeDesktopMappings, resolveClaudeDesktopAccessState, resolveClaudeDesktopCatalog, resolveClaudeDesktopDefaultMappings, resolveClaudeDesktopStartupCatalog, restoreClaudeAppForTermination, restoreClaudeBeforeQuit, RestoreClaudeGatewayForShutdown, runAppSyncBarrier, runDarwinAppSyncBarrier, runInBackground, sameProcess, selectKnownClaudeDesktopModels, setClaudeDesktopAutoMode, setClaudeDesktopConnection, SetClaudeGatewayInstalled, setClaudeGatewayInstalled, setClaudeProxyFailure, SetCodexDesktopConnected, setOnboardingWindowStyle, setShowAppsInMenu, ShowUI, showWindow, startClaudeAppProxy, startClaudeGateway, startedAfter, StartUI, StartUpdate, stopClaudeAppProxy, stopDarwinAppProcess, StopUI, styleWindow, UpdateAvailable, updateClaudeDesktopProfile, updateClaudeProxyMenu, validateClaudeDesktopModels, waitForAppProcesses filepath.Join -> os.Getwd -> slog.Warn -> filepath.Join -> filepath.Join -> os.Getenv -> filepath.Join -> os.Getenv -> strings.TrimRight -> strings.TrimRight -> errors.New -> C.GoString -> wv.Run -> styleWindow -> wv.webview.Window -> C.setWindowDelegate -> wv.webview.Window -> openUI -> C._Bool -> wv.OnboardingActive -> wv.IsRunning -> showWindow -> wv.webview.Window -> C.CString -> C.free -> unsafe.Pointer -> StartUI -> C.CString -> C.free -> unsafe.Pointer -> C.uiRequest -> wv.Terminate -> updater.DoUpgrade -> slog.Error -> slog.Debug -> LaunchNewApp -> startHiddenTasks -> len -> strings.TrimPrefix -> slog.Info -> C.CString -> C.free -> unsafe.Pointer -> C.launchApp -> slog.Info -> time.Sleep -> slog.Info -> os.Exit -> strings.HasPrefix -> strings.TrimSuffix -> filepath.Ext -> appMove -> C.askToMoveToApplications -> os.Stat -> slog.Warn -> time.Now -> started.Add -> handoffDeadline.Add -> terminateDeadline.Add -> controller.discover -> process.startedAfter -> fmt.Errorf -> len -> time.Now().Before -> time.Now -> fmt.Errorf -> time.Sleep -> controller.stop -> waitForAppProcesses -> controller.stop -> waitForAppProcesses -> controller.stop -> waitForAppProcesses -> fmt.Errorf -> controller.running -> time.Now().Before -> time.Now -> time.Sleep -> errors.New -> unix.SysctlKinfoProc -> errors.Is -> errors.Is -> syscall.Kill -> int -> int64 -> C.otherOllamaProcesses -> errors.New -> C.free -> unsafe.Pointer -> unsafe.Slice -> int -> make -> len -> int -> int64 -> darwinProcessIdentityForPID -> errors.Is -> fmt.Errorf -> actual.sameProcess -> darwinAppProcessRunning -> slog.Info -> syscall.Kill -> errors.Is -> fmt.Errorf -> darwinProcessIdentityForPID -> os.Getpid -> runAppSyncBarrier -> errors.Is -> slog.Info -> slog.Warn -> continueAfterBarrierError -> errors.Is -> killOtherInstances -> C.CString -> C.free -> unsafe.Pointer -> exec.LookPath -> os.Readlink -> filepath.Abs -> slog.Info -> C.installSymlink -> slog.Error -> slog.Debug -> C.updateAvailable -> make -> make -> signal.Notify -> signal.Stop -> close -> slog.Info -> quitForHandoff -> registerLaunchAgent -> reconcileClaudeAppProxy -> slog.Warn -> stopClaudeAppProxy -> slog.Debug -> C.run -> C._Bool -> C._Bool -> claudeDesktop.UsesOllamaGateway -> len -> launch.ClaudeDesktopModels -> markClaudeDesktopIntegrationUsed -> slog.Warn -> claudeDesktopInstalled -> stopClaudeAppProxy -> startClaudeAppProxy -> updateClaudeDesktopProfile -> effectiveClaudeDesktopAutoMode -> activeClaudeDesktopModels -> claudeDesktop.AutodiscoveryConfiguredWithAutoMode -> claudeDesktopRunning -> claudeDesktop.ConfigureAutodiscoveryWithAutoMode -> fmt.Errorf -> claudeProxyStartMu.Lock -> claudeProxyStartMu.Unlock -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> claudeProxyMu.Unlock -> claudeDesktopInstalled -> slog.Debug -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> envconfig.ConnectableHost -> claudeGatewayPort -> recordClaudeProxyFailure -> fmt.Errorf -> ollamaURL.Port -> recordClaudeProxyFailure -> fmt.Errorf -> resolveClaudeDesktopStartupCatalog -> context.Background -> ensureClaudeDesktopModelsAvailable -> context.Background -> recordClaudeProxyFailure -> proxy.NewClaudeDesktop -> ollamaURL.String -> slog.Default -> refreshClaudeDesktopCatalog -> recordClaudeProxyFailure -> startClaudeGateway -> gateway.Close -> context.Background -> errors.Is -> recordClaudeProxyFailure -> claudeProxyMu.Lock -> claudeCatalogNow -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> launch.ClaudeDesktopModels -> launch.ClaudeDesktopModelMappings -> len -> claudeLocalModelsResolver -> allClaudeDesktopModelsLocal -> len -> proxy.MapClaudeDesktopModels -> proxy.SelectClaudeDesktopModels -> claudeModelsLoader -> claudeAccessStateResolver -> claudeCloudModelsResolver -> slog.Debug -> mergeClaudeDesktopCloudInventory -> len -> proxy.MapClaudeDesktopModels -> len -> proxy.MapClaudeDesktopModels -> proxy.DefaultClaudeDesktopMappingsForModels -> proxy.SelectClaudeDesktopModels -> len -> len -> includeSelectedClaudeDesktopModels -> len -> len -> modelref.HasExplicitCloudSource -> make -> len -> strings.TrimSpace -> strings.TrimSpace -> modelref.HasExplicitCloudSource -> claudeModelsLoader -> configuredClaudeDesktopModels -> len -> includeSelectedClaudeDesktopModels -> len -> launch.ClaudeDesktopModels -> claudeCatalogMu.Lock -> claudeCatalogMu.Unlock -> claudeProxyMu.Lock -> append -> hasCloudClaudeDesktopModel -> claudeCatalogNow().Before -> claudeCatalogNow -> claudeCatalogUpdated.Add -> append -> claudeProxyMu.Unlock -> len -> claudeModelsLoader -> len -> proxy.PreserveClaudeDesktopCloudEntitlements -> proxy.WithoutClaudeDesktopRecommendationMappings -> proxy.WithoutClaudeDesktopRecommendationMappings -> claudeAccessStateResolver -> claudeCloudModelsResolver -> slog.Debug -> mergeClaudeDesktopCloudInventory -> includeSelectedClaudeDesktopModels -> mergeClaudeDesktopCloudInventory -> configuredClaudeDesktopModels -> len -> includeSelectedClaudeDesktopModels -> len -> launch.ClaudeDesktopModels -> claudeProxyMu.Lock -> append -> claudeCatalogNow -> claudeProxyMu.Unlock -> len -> proxy.ClaudeDesktopMappings -> len -> proxy.MapClaudeDesktopModels -> launch.ClaudeDesktopModelMappings -> len -> proxy.MapClaudeDesktopModels -> proxy.SelectClaudeDesktopModels -> launch.ClaudeDesktopModels -> newSignedOllamaRequest -> claudeRecommendationsEndpoint -> slog.Debug -> fallbackClaudeDesktopModels -> proxy.FetchClaudeDesktopModels -> slog.Debug -> fallbackClaudeDesktopModels -> newSignedOllamaRequest -> claudeCloudModelsEndpoint -> fmt.Errorf -> claudeCloudModelsClient.Do -> fmt.Errorf -> resp.Body.Close -> io.Copy -> io.LimitReader -> fmt.Errorf -> json.NewDecoder -> io.LimitReader -> decoder.Decode -> fmt.Errorf -> make -> len -> append -> append -> proxy.ClaudeDesktopModelsFromCloudInventory -> proxy.UnverifyClaudeDesktopCloudEntitlements -> proxy.DefaultClaudeDesktopModels -> claudeDesktopModelSupportsAutoMode -> claudeProxyMu.Lock -> append -> claudeProxyMu.Unlock -> gateway.Models -> len -> proxy.SelectClaudeDesktopModels -> launch.ClaudeDesktopModels -> len -> launch.ClaudeDesktopAutoModeEnabled -> claudeDesktopModelsSupportAutoMode -> append -> make -> len -> append -> proxy.VerifyClaudeDesktopModelsWithCloudInventory -> make -> len -> append -> time.Now().Add -> time.Now -> gateway.Start -> errors.Is -> time.Now().After -> time.Now -> time.Sleep -> context.WithTimeout -> cloudStatus -> cancel -> fmt.Errorf -> context.WithTimeout -> whoami -> cancel -> errors.As -> fmt.Errorf -> strings.TrimSpace -> strings.TrimSpace -> api.NewClient -> envconfig.ConnectableHost -> resolveClaudeDesktopAccessState -> context.WithTimeout -> cancel -> list -> make -> len -> modelref.HasExplicitCloudSource -> modelref.HasExplicitCloudSource -> append -> strings.TrimSuffix -> append -> append -> strings.TrimSuffix -> append -> api.NewClient -> envconfig.ConnectableHost -> claudeLocalModels -> time.Now().Add -> time.Now -> hasCloudClaudeDesktopModel -> claudeAccessStateResolver -> slog.Debug -> claudeLocalModelsResolver -> slog.Debug -> validateClaudeDesktopModels -> errors.Is -> time.Now().After -> time.Now -> time.NewTimer -> ctx.Done -> timer.Stop -> ctx.Err -> make -> len -> make -> proxy.EvaluateClaudeDesktopModelAccess -> errors.New -> errors.New -> errors.New -> errors.New -> errors.New -> net.SplitHostPort -> claudeGatewayPort -> strconv.Atoi -> C.int -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> setClaudeProxyFailure -> C._Bool -> C._Bool -> setClaudeGatewayInstalled -> slog.Warn -> C._Bool -> C._Bool -> C._Bool -> hasUsedClaudeDesktopIntegration -> appStore.Settings -> slog.Warn -> appStore.Settings -> fmt.Errorf -> appStore.SetSettings -> fmt.Errorf -> claudeLifecycleMu.Lock -> claudeLifecycleMu.Unlock -> claudeDesktopInstalled -> errors.New -> markClaudeDesktopIntegrationUsed -> fmt.Errorf -> startClaudeAppProxy -> effectiveClaudeDesktopAutoMode -> activeClaudeDesktopModels -> claudeDesktop.SetInstalledFromDesktopWithAutoMode -> claudeDesktop.UsesOllamaGateway -> stopClaudeAppProxy -> C._Bool -> claudeDesktopInstalled -> C._Bool -> launch.ClaudeDesktopRunning -> C._Bool -> codexDesktop.Installed -> C._Bool -> codexDesktop.OllamaConfigured -> C._Bool -> codexDesktop.Running -> C.ulonglong -> codexDesktop.OllamaRequestCount -> C._Bool -> C._Bool -> setCodexDesktopConnection -> slog.Warn -> C._Bool -> C._Bool -> C._Bool -> claudeDesktop.UsesOllamaGateway -> C._Bool -> claudeGatewayStartFailed -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> C._Bool -> claudeGatewayPortConflict -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> C.CString -> C.CString -> claudeProxyErr.Error -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> claudeDesktopConnectionSummary -> hasUsedClaudeDesktopIntegration -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> gateway.Counts -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> claudeGatewayPort -> strconv.Atoi -> claudeDesktopInstalled -> claudeDesktop.UsesOllamaGateway -> launch.ClaudeDesktopRunning -> claudeDesktopRequestCount -> proxyErr.Error -> claudeDesktopConnectionStatus -> context.Background -> hasUsedClaudeDesktopIntegration -> claudeProxyMu.Lock -> hasCloudClaudeDesktopModel -> claudeProxyMu.Unlock -> claudeAccessStateResolver -> slog.Debug -> gateway.Models -> refreshClaudeDesktopCatalog -> len -> proxy.SelectClaudeDesktopModels -> launch.ClaudeDesktopModels -> len -> make -> len -> claudeLocalModelsResolver -> slog.Debug -> make -> len -> make -> len -> proxy.EvaluateClaudeDesktopModelAccess -> append -> claudeDesktopModelSupportsAutoMode -> proxy.ClaudeDesktopMappings -> len -> len -> launch.ClaudeDesktopModels -> proxy.DefaultClaudeDesktopMappingsForModels -> make -> proxy.ClaudeDesktopRoutes -> append -> claudeDesktopConnectionSummary -> launch.ClaudeDesktopAutoModeEnabled -> autoModeErr.Error -> claudeModelsLoader -> proxy.DefaultClaudeDesktopMappingsForModels -> len -> errors.New -> claudeDesktopInstalled -> errors.New -> setClaudeGatewayInstalled -> claudeDesktopInstalled -> errors.New -> startClaudeAppProxy -> effectiveClaudeDesktopAutoMode -> activeClaudeDesktopModels -> claudeDesktop.ConfigureAutodiscoveryWithAutoMode -> claudeDesktop.UsesOllamaGateway -> stopClaudeAppProxy -> launch.OpenClaudeDesktop -> activeClaudeDesktopModels -> claudeDesktopModelsSupportAutoMode -> errors.New -> launch.ClaudeDesktopAutoModeEnabled -> claudeDesktop.UsesOllamaGateway -> claudeDesktop.AutodiscoveryConfiguredWithAutoMode -> claudeDesktop.UsesOllamaGateway -> launch.SaveClaudeDesktopAutoMode -> fmt.Errorf -> claudeDesktop.ApplyProfileChange -> launch.SaveClaudeDesktopAutoMode -> fmt.Errorf -> claudeDesktop.ConfigureAutodiscoveryWithAutoMode -> applyClaudeDesktopMappingsWithOpen -> claudeLifecycleMu.Lock -> claudeLifecycleMu.Unlock -> hasUsedClaudeDesktopIntegration -> resolveClaudeDesktopDefaultMappings -> context.Background -> claudeDesktop.UsesOllamaGateway -> maps.Equal -> launch.ClaudeDesktopModelMappings -> launch.SaveClaudeDesktopModelMappings -> fmt.Errorf -> applyClaudeDesktopMappingsWithOpen -> claudeDesktopInstalled -> errors.New -> make -> proxy.ClaudeDesktopRoutes -> fmt.Errorf -> strings.TrimSpace -> len -> errors.New -> claudeProxyMu.Lock -> append -> claudeProxyMu.Unlock -> gateway.Models -> refreshClaudeDesktopCatalog -> context.Background -> len -> claudeLocalModelsResolver -> context.Background -> slog.Debug -> claudeAccessStateResolver -> context.Background -> slog.Debug -> make -> len -> strings.TrimSpace -> append -> hasExplicitCloudClaudeDesktopModelName -> claudeCloudModelsResolver -> context.Background -> slog.Debug -> mergeClaudeDesktopCloudInventory -> mapKnownClaudeDesktopModels -> ensureClaudeDesktopModelsAvailable -> context.Background -> proxy.ClaudeDesktopMappings -> launch.ClaudeDesktopModels -> launch.ClaudeDesktopModelMappings -> maps.Equal -> claudeDesktop.Running -> len -> gateway.SetModels -> launch.RestoreClaudeDesktopModelMappings -> errors.Join -> fmt.Errorf -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> launch.SaveClaudeDesktopModelMappings -> fmt.Errorf -> startClaudeAppProxy -> effectiveClaudeDesktopAutoMode -> claudeDesktop.ConfigureAutodiscoveryWithAutoMode -> claudeDesktop.ApplyProfileChange -> errors.Is -> stopClaudeAppProxy -> errors.Join -> restoreState -> claudeDesktop.Running -> claudeDesktop.Open -> fmt.Errorf -> fmt.Errorf -> launch.SaveClaudeDesktopModelMappings -> fmt.Errorf -> gateway.SetModels -> claudeProxyMu.Lock -> includeSelectedClaudeDesktopModels -> claudeProxyMu.Unlock -> effectiveClaudeDesktopAutoMode -> claudeDesktop.ConfigureAutodiscoveryWithAutoMode -> claudeDesktop.ApplyProfileChange -> errors.Is -> errors.Join -> restoreState -> claudeDesktop.Running -> claudeDesktop.Open -> fmt.Errorf -> fmt.Errorf -> includeSelectedClaudeDesktopModels -> make -> len -> len -> strings.TrimSpace -> strings.TrimSpace -> fmt.Errorf -> proxy.MapClaudeDesktopModels -> len -> errors.New -> includeSelectedClaudeDesktopModels -> make -> len -> len -> strings.TrimSpace -> strings.TrimSpace -> fmt.Errorf -> proxy.SelectClaudeDesktopModels -> len -> errors.New -> claudeDesktopInstallResultFromCode -> int -> C.installClaudeDesktop -> codexDesktopInstallResultFromCode -> int -> C.installCodexDesktop -> int -> int -> strings.TrimRight -> http.NewRequestWithContext -> req.URL.Query -> query.Set -> strconv.FormatInt -> time.Now().Unix -> time.Now -> query.Encode -> signOllamaData -> fmt.Sprintf -> req.URL.RequestURI -> fmt.Errorf -> req.Header.Set -> newSignedOllamaRequest -> context.Background -> claudeDesktopDownloadEndpoint -> slog.Warn -> C.CString -> req.Header.Get -> C.CString -> req.URL.String -> C.GoString -> unsafe.Pointer -> installClaudeDesktopZip -> claudeDesktopInstallDestinations -> errors.Is -> claudeDesktopInstalled -> slog.Info -> C._Bool -> slog.Warn -> C._Bool -> slog.Info -> C._Bool -> C.GoString -> unsafe.Pointer -> installCodexDesktopDiskImage -> codexDesktopInstallDestinations -> slog.Warn -> C._Bool -> errors.Is -> codexDesktop.Installed -> slog.Info -> C._Bool -> slog.Warn -> C._Bool -> slog.Info -> C._Bool -> bool -> C.ShowAppsInMenu -> C.SetShowAppsInMenu -> C._Bool -> int -> int -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> updateClaudeProxyMenu -> proxy.Counts -> C.updateClaudeProxyMenu -> C.ulonglong -> claudeProxyStartMu.Lock -> claudeProxyStartMu.Unlock -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> context.WithTimeout -> context.Background -> cancel -> proxy.Close -> slog.Debug -> appHandoffInProgress.Store -> quit -> context.WithTimeout -> context.Background -> cancel -> restoreClaudeAppForTermination -> appHandoffInProgress.Load -> slog.Warn -> C.quit -> restore -> claudeLifecycleMu.Lock -> claudeLifecycleMu.Unlock -> stopClaudeAppProxy -> claudeDesktop.UsesOllamaGateway -> restoreClaudeBeforeQuit -> claudeDesktop.UsesOllamaGateway -> stopClaudeAppProxy -> context.WithTimeout -> context.Background -> cancel -> restoreClaudeAppForTermination -> slog.Warn -> C._Bool -> C._Bool -> C.CString -> C.free -> unsafe.Pointer -> C.launchApp -> C.unregisterSelfFromLoginItem -> C.registerSelfAsLoginItem -> C._Bool -> os.Executable -> filepath.Dir -> filepath.Base -> filepath.Dir -> filepath.Dir -> slog.Info -> slog.Info -> C.hideWindow -> C.uintptr_t -> uintptr -> C.showWindow -> C.uintptr_t -> uintptr -> C.styleWindow -> C.uintptr_t -> uintptr -> styleWindow -> C.setWindowResizable -> C.uintptr_t -> uintptr -> C.bool -> exec.Command -> filepath.Join -> cmd.Run -> slog.Error -> os.Exit -> slog.Error -> os.Exit -> C.drag -> C.uintptr_t -> uintptr -> C.doubleClick -> C.uintptr_t -> uintptr -> handleConnectURLScheme appui "github.com/ollama/ollama/app/ui, C, context, encoding/json, errors, fmt, github.com/ollama/ollama/api, github.com/ollama/ollama/app/updater, github.com/ollama/ollama/app/version, github.com/ollama/ollama/cmd/launch, github.com/ollama/ollama/envconfig, github.com/ollama/ollama/internal/modelref, github.com/ollama/ollama/internal/proxy, golang.org/x/sys/unix, io, log/slog, maps, net, net/http, ollamaAuth "github.com/ollama/ollama/auth, os, os/exec, os/signal, path/filepath, sql:/, sql:/connect, sql:Authorization, sql:HOME, sql:ollama, strconv, strings, sync, sync/atomic, syscall, time, unsafe Globals{read=[ollamaPath, updater, filepath, pwd, err, os, slog, claudeProxyFailureNone, claudeProxyFailurePortConflict, autoMode, installed, restart, change, restartConfirmed, ctx, isApp, appLogPath, launchAgentPath, claudeAppProxy, claudeProxyStartMu, claudeLifecycleMu, claudeProxyMu, claudeCatalogMu, claudeProxyErr, claudeProxyFail, claudeDesktop, claudeDesktopInstalled, launch, claudeDesktopRunning, claudeProxyListenAddr, proxy, claudeProxyRetryWait, time, claudeProxyRetryPoll, claudeAccessRetryWait, claudeAccessRetryPoll, claudeCatalogRefreshInterval, claudeCatalogNow, claudeShutdownTimeout, claudeRecommendationsClient, Timeout, claudeRecommendationsEndpoint, strings, appui, claudeCloudModelsClient, claudeCloudModelsEndpoint, signOllamaData, ollamaAuth, claudeModelsLoader, loadClaudeDesktopModels, claudeCloudModelsResolver, currentClaudeDesktopCloudModels, claudeAvailableModels, claudeModelSource, claudeCatalogUpdated, claudeAccessStateResolver, currentClaudeDesktopAccessState, claudeLocalModelsResolver, currentClaudeDesktopLocalModels, errClaudeDesktopAccessUnavailable, errors, StartUI, path, p, C, wv, styleWindow, ShowUI, openUI, IsOnboardingActive, showWindow, unsafe, openAppsUI, StopUI, StartUpdate, LaunchNewApp, darwinStartHiddenTasks, startHiddenTasks, init, appName, maybeMoveAndRestart, CannotMove, AlreadyMoved, status, appMove, MoveCompleted, _, MoveError, other, appProcessStopForHandoff, appProcessStopGracefully, appProcessStopForcefully, runAppSyncBarrier, controller, config, started, handoffDeadline, terminateDeadline, deadline, sawEmpty, processes, fmt, errNewerAppInstance, exited, waitForAppProcesses, pollInterval, running, alive, appSyncBarrierHandoffTimeout, appSyncBarrierTerminateTimeout, appSyncBarrierKillTimeout, appSyncBarrierPollInterval, appSyncBarrierSettlePeriod, killOtherInstances, runDarwinAppSyncBarrier, appHandoffInProgress, darwinProcessIdentityForPID, pid, unix, syscall, startedAt, int64, darwinOtherOllamaProcesses, discovered, count, identities, i, darwinAppProcessRunning, expected, actual, stopDarwinAppProcess, mode, processSignal, discover, stop, handoffTimeout, terminateTimeout, killTimeout, settlePeriod, continueAfterBarrierError, handleExistingInstance, installSymlink, cliPath, cmd, exec, resolved, tmp, code, UpdateAvailable, ver, osRun, hasCompletedFirstRun, startHidden, showOnboarding, handoffSignal, handoffDone, signal, quitForHandoff, registerLaunchAgent, reconcileClaudeAppProxy, stopClaudeAppProxy, configured, markClaudeDesktopIntegrationUsed, startClaudeAppProxy, updateClaudeDesktopProfile, effectiveClaudeDesktopAutoMode, activeClaudeDesktopModels, clearClaudeProxyFailure, ollamaURL, envconfig, gatewayPort, claudeGatewayPort, recordClaudeProxyFailure, availableModels, activeModels, modelSource, resolveClaudeDesktopStartupCatalog, context, ensureClaudeDesktopModelsAvailable, gateway, ListenAddr, OllamaURL, Model, Models, Logger, OnCountsChanged, updateClaudeProxyMenu, RefreshModels, current, selected, refreshClaudeDesktopCatalog, ResolveAccessState, ListLocalModels, startClaudeGateway, failure, available, source, selectedNames, savedMappings, localNames, allClaudeDesktopModelsLocal, selectable, state, cloudModels, mergeClaudeDesktopCloudInventory, includeSelectedClaudeDesktopModels, hasExplicitCloudClaudeDesktopModelName, names, name, modelref, local, ok, resolveClaudeDesktopCatalog, configuredClaudeDesktopModels, force, previous, fresh, hasCloudClaudeDesktopModel, reloaded, cloudInventory, cloudInventoryKnown, model, accountModel, mappings, req, newSignedOllamaRequest, http, fallbackClaudeDesktopModels, models, resp, io, payload, decoder, json, claudeDesktopModelSupportsAutoMode, claudeDesktopModelsSupportAutoMode, enabled, seen, resolveClaudeDesktopAccessState, cloudStatus, whoami, Cloud, Account, statusCtx, cancel, accountCtx, user, authErr, client, api, claudeLocalModels, response, alias, stateErr, localErr, validateClaudeDesktopModels, timer, inventoryKnown, reasons, isInstalled, access, port, net, ClaudeGatewayPort, portText, strconv, setClaudeProxyFailure, SetClaudeGatewayInstalled, restartClaude, shouldInstall, shouldRestart, setClaudeGatewayInstalled, HasUsedClaudeDesktopIntegration, hasUsedClaudeDesktopIntegration, appStore, settings, IsClaudeDesktopInstalled, IsClaudeDesktopRunning, IsCodexDesktopInstalled, codexDesktop, IsCodexDesktopConnected, IsCodexDesktopRunning, CodexDesktopRequestCount, SetCodexDesktopConnected, connected, shouldConnect, confirmed, setCodexDesktopConnection, IsClaudeGatewayConfigured, ClaudeGatewayStartFailed, claudeGatewayStartFailed, ClaudeGatewayPortConflict, claudeGatewayPortConflict, ClaudeGatewayErrorMessage, getClaudeDesktopConnectionSummary, claudeDesktopConnectionSummary, claudeDesktopRequestCount, used, proxyErr, proxyFailure, Supported, Used, Installed, Configured, Connected, Running, StartFailed, PortConflict, GatewayPort, RoutedRequests, getClaudeDesktopConnectionStatus, claudeDesktopConnectionStatus, selectedModels, accessState, cachedCatalogHasCloud, accessErr, localModels, modelStatuses, isSelected, Name, DisplayName, Description, Selected, AutoMode, Availability, Reason, RequiredPlan, mappedModels, mappingStatuses, route, RouteID, RouteName, autoModeErr, resolveClaudeDesktopDefaultMappings, setClaudeDesktopConnection, prepareClaudeDesktopConnection, openClaudeDesktopApplication, setClaudeDesktopAutoMode, applyClaudeDesktopMappings, applyClaudeDesktopMappingsWithOpen, resetClaudeDesktopMappings, maps, openWhenStopped, knownRoutes, routeID, previousAvailable, previousSource, previousCatalogUpdated, refreshedCurrent, mappedNames, mapKnownClaudeDesktopModels, normalized, previousSelection, previousMappings, mappingsChanged, restoreState, rollbackErr, applyInitialChange, applyModelChange, allowed, rawName, selectKnownClaudeDesktopModels, requestClaudeDesktopInstall, claudeDesktopInstallResultFromCode, requestCodexDesktopInstall, codexDesktopInstallResultFromCode, codexDesktopInstallerOpened, codexDesktopInstallCancelled, codexDesktopInstallFailed, claudeDesktopDownloadEndpoint, baseURL, method, endpoint, query, signature, ClaudeDesktopDownloadRequest, authorization, InstallClaudeDesktopArchive, archivePath, installedPath, installClaudeDesktopZip, claudeDesktopInstallDestinations, verifyClaudeDesktopBundle, errClaudeDesktopDestinationExists, InstallCodexDesktopDiskImage, imagePath, installCodexDesktopDiskImage, codexDesktopInstallDestinations, verifyCodexDesktopBundle, errCodexDesktopDestinationExists, getShowAppsInMenu, setShowAppsInMenu, visible, claudeDesktopInstallerOpened, claudeDesktopInstallCancelled, claudeDesktopInstallFailed, RefreshClaudeProxyMenu, counts, quit, restoreClaudeAppForTermination, restoreClaudeBeforeQuit, restore, handoff, RestoreClaudeGatewayForShutdown, logStartup, appPath, exe, version, hideWindow, ptr, uintptr, setOnboardingWindowStyle, runInBackground, drag, doubleClick, handleConnectURL, handleConnectURLScheme, checkAndHandleExistingInstance]}; Database{reads=[/ via gorm|/connect via gorm|Authorization via gorm|HOME via gorm|ollama via gorm]} 1865 database table read: /, database table read: /connect, database table read: Authorization, database table read: HOME, database table read: ollama, file open, http request, request object file write, printf SideEffects{CONFIG; DATABASE:read; FILE:read; LOG:console; NON_DETERMINISTIC; STATE:global; STATE:module; TIMER} "" | "", err | 0 | AlreadyMoved | C.CString("") | C.CString(claudeProxyErr.Error()) | C.CString(req.URL.String()) | C._Bool(claudeDesktop.UsesOllamaGateway()) | C._Bool(claudeDesktopInstalled()) | C._Bool(claudeGatewayPortConflict()) | C._Bool(claudeGatewayStartFailed()) | C._Bool(codexDesktop.Installed()) | C._Bool(codexDesktop.OllamaConfigured()) | C._Bool(codexDesktop.Running()) | C._Bool(false) | C._Bool(hasUsedClaudeDesktopIntegration()) | C._Bool(launch.ClaudeDesktopRunning()) | C._Bool(true) | C._Bool(wv.OnboardingActive()) | C.int(port) | C.ulonglong(codexDesktop.OllamaRequestCount()) | CannotMove | MoveError | actual.sameProcess(expected), nil | appProcessIdentity{ pid: pid, startedAt: process.Proc.P_starttime.Sec*... | appProcessIdentity{}, err | appProcessIdentity{}, syscall.ESRCH | applyClaudeDesktopMappingsWithOpen(mappings, restartConfirmed, false) | applyClaudeDesktopMappingsWithOpen(mappings, restartConfirmed, true) | available | available, selected, source | bool(C.ShowAppsInMenu()) | claudeDesktop.ApplyProfileChange(func() error { // Persist only after the nati... | claudeDesktop.ConfigureAutodiscoveryWithAutoMode(autoMode) | claudeDesktop.ConfigureAutodiscoveryWithAutoMode(enabled) | claudeDesktopConnectionStatus(context.Background()) | claudeDesktopConnectionSummary(hasUsedClaudeDesktopIntegration()) | claudeDesktopInstallCancelled | claudeDesktopInstallFailed | claudeDesktopInstallResultFromCode(int(C.installClaudeDesktop())) | claudeDesktopInstallerOpened | claudeLocalModels(ctx, client.List) | claudeProxyErr != nil | claudeProxyFail == claudeProxyFailurePortConflict | codexDesktopInstallCancelled | codexDesktopInstallFailed | codexDesktopInstallResultFromCode(int(C.installCodexDesktop())) | codexDesktopInstallerOpened | continueAfterBarrierError(err) | ctx.Err() | enabled && claudeDesktopModelsSupportAutoMode(models), nil | err | err == nil || !errors.Is(err, errNewerAppInstance) | errClaudeDesktopAccessUnavailable | errors.New("Choose at least one model in Ollama Settings") | errors.New("Claude Desktop is not installed") | errors.New("Cloud models are off. Choose an installed model in Ollama Settings") | errors.New("Install the selected model or choose another model in Ollama Setting... | errors.New("Select another model in Settings to connect Claude") | errors.New("Sign in to Ollama or choose an installed model in Ollama Settings") | errors.New("select at least one cloud model available to your Ollama.com account... | fallbackClaudeDesktopModels(), "fallback" | false | false, err | false, errors.Join(err, restoreState()) | false, errors.New("Claude Desktop is not installed") | false, errors.New("map at least one Claude Desktop route") | false, fmt.Errorf("inspect Ollama app process %d: %w", expected.pid, err) | false, fmt.Errorf("open Claude Desktop: %w", err) | false, fmt.Errorf("save Claude Desktop model mappings: %w", err) | false, fmt.Errorf("unknown Claude Desktop route %q", routeID) | false, nil | filepath.Join(pwd, "ollama") | filepath.Join(updater.BundlePath, "Contents", "Resources", "ollama") | fmt.Errorf("%w: pid %d", errNewerAppInstance, process.pid) | fmt.Errorf("load settings: %w", err) | fmt.Errorf("remember Claude Desktop connection: %w", err) | fmt.Errorf("save Claude Desktop auto mode: %w", err) | fmt.Errorf("save Claude Desktop model mappings: %w", err) | fmt.Errorf("save settings: %w", err) | fmt.Errorf("signal Ollama app process %d: %w", process.pid, err) | fmt.Errorf("timed out waiting for app instances to exit") | fmt.Errorf("update Claude Desktop profile: %w", err) | gateway.Counts().Routed | killOtherInstances() | launch.OpenClaudeDesktop() | mappings, nil | mappingsChanged, nil | model.AccountCloud | models | models, "endpoint" | names, nil | nil | nil, err | nil, errors.New("discover other Ollama app processes") | nil, errors.New("map at least one Claude Desktop route") | nil, errors.New("no Claude model mapping defaults are available") | nil, errors.New("select at least one Claude Desktop model") | nil, fmt.Errorf("decode account cloud models: %w", err) | nil, fmt.Errorf("fetch account cloud models: %w", err) | nil, fmt.Errorf("fetch account cloud models: status %d", resp.StatusCode) | nil, fmt.Errorf("model %q is not installed, recommended, or available to this Ol... | nil, fmt.Errorf("model %q mapped from %s is not installed or recommended for Cla... | nil, fmt.Errorf("prepare account cloud model request: %w", err) | nil, fmt.Errorf("sign request: %w", err) | p.pid == other.pid && p.startedAt == other.startedAt | p.pid > other.pid | p.startedAt > other.startedAt | port, nil | processes, nil | proxy.ClaudeDesktopModelsFromCloudInventory(names), nil | proxy.MapClaudeDesktopModels(available, mappings) | proxy.SelectClaudeDesktopModels(available, launch.ClaudeDesktopModels()) | recordClaudeProxyFailure( fmt.Errorf("OLLAMA_HOST cannot use port %s because ... | recordClaudeProxyFailure(err, claudeProxyFailureNone) | recordClaudeProxyFailure(err, failure) | recordClaudeProxyFailure(fmt.Errorf("parse Claude gateway address: %w", err), cl... | req, nil | resolveClaudeDesktopAccessState(ctx, client.CloudStatusExperimental, client.Whoa... | restore(ctx) | rollbackErr | selected | selected, nil | selected, selected, "user" | setClaudeGatewayInstalled(enabled, restartConfirmed) | setClaudeProxyFailure(err, failure) | settings.ClaudeDesktopUsed | state, fmt.Errorf("check Ollama account: %w", err) | state, fmt.Errorf("check whether Ollama cloud is enabled: %w", err) | state, nil | status | strings.TrimRight(appui.OllamaDotCom, "/") + "/api/experimental/model-recommenda... | strings.TrimRight(appui.OllamaDotCom, "/") + "/api/tags" | strings.TrimRight(baseURL, "/") + "/download-app?app=claude-desktop&type=mac-zip... | true | true, fmt.Errorf("Claude model mappings were saved, but Claude Desktop could not... | true, nil | updateClaudeDesktopProfile() | void 897 go/backend present net/http, requests database, persistence
app cmd app app_darwin.h .h 2548 2.488281 0.00243 C-family C: recovered-header; parse-recovered; ambiguous-C-fallback; Provenance{dependencies:language-import confidence=high}; AnalysisAvailability{side-effects:parse-recovered}; AnalysisAvailability{side_effects:parse-recovered}; C-family side_effects unavailable: Side effects unavailable: parse-recovered; purity unproven stddef.h, stdint.h Globals{read=[AppDelegate, NSObject, NSApplicationDelegate, applicationDidFinishLaunching, NSNotification, aNotification, enum, AppMove, CannotMove, UserDeclinedMove, MoveCompleted, AlreadyMoved, LoginSession, PermissionDenied, MoveError, run, showOnboarding, startHidden, otherOllamaProcesses, processes, count, askToMoveToApplications, createSymlinkWithAuthorization, installSymlink, cliPath, Restart, StartUI, path, ShowUI, IsOnboardingActive, StopUI, StartUpdate, darwinStartHiddenTasks, launchApp, appPath, updateAvailable, quit, uiRequest, registerSelfAsLoginItem, firstTimeRun, unregisterSelfFromLoginItem, setWindowDelegate, showWindow, wndPtr, hideWindow, styleWindow, setWindowResizable, resizable, drag, doubleClick, handleConnectURL, SetClaudeGatewayInstalled, installed, restartClaude, HasUsedClaudeDesktopIntegration, RestoreClaudeGatewayForShutdown, IsClaudeGatewayConfigured, IsClaudeDesktopInstalled, IsClaudeDesktopRunning, IsCodexDesktopInstalled, IsCodexDesktopConnected, IsCodexDesktopRunning, CodexDesktopRequestCount, SetCodexDesktopConnected, connected, restartConfirmed, ClaudeGatewayStartFailed, ClaudeGatewayPortConflict, ClaudeGatewayErrorMessage, ClaudeGatewayPort, RefreshClaudeProxyMenu, updateClaudeProxyMenu, routed, ShowAppsInMenu, SetShowAppsInMenu, visible, ClaudeInstallCancelled, ClaudeInstallerOpened, ClaudeInstallFailed, installClaudeDesktop, installCodexDesktop, ClaudeDesktopDownloadRequest, authorization, InstallClaudeDesktopArchive, archivePath, InstallCodexDesktopDiskImage, imagePath]} 78 UNKNOWN 1 unknown not detected
app cmd app app_darwin.m .m 98060 95.761719 0.093517 AnalysisAvailability{complexity:unsupported-code}; AnalysisAvailability{side-effects:unsupported-code}; AnalysisAvailability{side_effects:unsupported-code} 2255 UNKNOWN
app cmd app app_darwin_test.go .go 117237 114.489258 0.111806 Functions: TestMain, TestLoadClaudeDesktopModelsUsesAppEndpoint, TestCurrentClaudeDesktopCloudModelsUsesAccountEndpoint, TestClaudeDesktopDownloadEndpointUsesTypedZipContract, TestClaudeEndpointRequestsSignCompleteRequestURI โ€” API Endpoint Handler โ€” [API Endpoint, Channels, Concurrent, Database IO, Error Handling, Event-Driven, Logging, MVC, Map/Filter/Reduce, Network IO, Serializer, Stateful, Stream Processing, Threads, Transformer, Validator] API Endpoint Handler โ€” Tags: API Endpoint, Channels, Concurrent, Database IO, Error Handling, Event-Driven, Logging, MVC, Map/Filter/Reduce, Network IO, Serializer, Stateful, Stream Processing, Threads, Transformer, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} ApplyProfileChange, AutodiscoveryConfiguredWithAutoMode, claudeDesktopRecommendationModelsForTest, ConfigureAutodiscoveryWithAutoMode, Open, RestoreForShutdown, Running, setClaudeProxyRetry, SetInstalledFromDesktopWithAutoMode, sharedClaudeDesktopMappings, TestApplyClaudeDesktopMappingsDoesNotRestartWithoutChanges, TestApplyClaudeDesktopMappingsKeepsCommittedMappingsWhenOpenFails, TestApplyClaudeDesktopMappingsPersistsSelection, TestApplyClaudeDesktopMappingsRejectsEmptyMapping, TestApplyClaudeDesktopMappingsRejectsUnknownRoute, TestApplyClaudeDesktopMappingsRequiresLiveRestartConfirmation, TestApplyClaudeDesktopMappingsRollsBackWhenRestartFails, TestApplyClaudeDesktopMappingsStartsClaudeWhenStopped, TestClaudeDesktopAutoModeModelEligibility, TestClaudeDesktopCatalogListsAccountModelsWithoutChangingDefaults, TestClaudeDesktopConnectionStatusKeepsConfiguredStateOnGatewayFailure, TestClaudeDesktopConnectionStatusPrefersActiveGatewayMappings, TestClaudeDesktopConnectionStatusReportsMissingApp, TestClaudeDesktopDefaultsDoNotDependOnAccountPlan, TestClaudeDesktopDownloadEndpointUsesTypedZipContract, TestClaudeDesktopInstallResultFromCode, TestClaudeDesktopIntegrationHistoryPersists, TestClaudeEndpointRequestsAreNotSentUnsigned, TestClaudeEndpointRequestsSignCompleteRequestURI, TestClaudeGatewayDoesNotReportPortConflictWithoutClaude, TestClaudeGatewayLocalSelectionCatalogPolicy, TestClaudeGatewayPortTracksListenAddress, TestClaudeGatewayRecoversAfterPortConflict, TestClaudeGatewayRejectsOllamaHostPortConflict, TestClaudeGatewayRejectsSpoofedExistingGateway, TestClaudeGatewayStartupWithLocalSelectionSkipsCloudLookupsButSettingsLoadsCatalog, TestClaudeGatewayWaitsForPreviousListenerToExit, TestClaudeLocalModels, TestCodexDesktopInstallResultFromCode, TestContinueAfterBarrierErrorOnlyBlocksNewerInstance, TestCurrentClaudeDesktopCloudModelsUsesAccountEndpoint, TestDarwinAppProcessRunningReportsExitedProcess, TestEnsureClaudeDesktopModelsAvailableRetriesStartupRace, TestHandleExistingInstanceReturnsBarrierResult, TestHandleExistingInstanceSkipsDevelopmentBuild, TestIncludeSelectedClaudeDesktopModelsKeepsCustomModels, TestLoadClaudeDesktopModelsFallsBackWithoutMLX, TestLoadClaudeDesktopModelsUsesAppEndpoint, TestMain, TestMapKnownClaudeDesktopModelsAllowsSharedModels, TestPrepareClaudeDesktopConnectionPreservesFirstUseIntro, TestRefreshClaudeDesktopCatalogDoesNotDowngradeEntitlementOnFallback, TestRefreshClaudeDesktopCatalogDropsStaleDefaultsOnFallback, TestRefreshClaudeDesktopCatalogFailsClosedForRemovedSelection, TestRefreshClaudeDesktopCatalogUpdatesPolicyAndPreservesSlots, TestResetClaudeDesktopMappingsDoesNotOpenStoppedClaude, TestResetClaudeDesktopMappingsPreservesSavedMappingsForEmptyContract, TestResetClaudeDesktopMappingsSerializesDisconnectDuringCatalogRefresh, testResetClaudeDesktopMappingsSerializesLifecycleChange, TestResetClaudeDesktopMappingsSerializesShutdownDuringCatalogRefresh, TestResolveClaudeDesktopAccessState, TestResolveClaudeDesktopCatalogUsesPersistedSelection, TestResolveClaudeDesktopDefaultMappingsUsesContractWithoutAccountLookup, TestResolveClaudeDesktopStartupCatalogDoesNotListCloudWhenOff, TestResolveClaudeDesktopStartupCatalogMarksDefaultAccountModelsAutoEligible, TestResolveClaudeDesktopStartupCatalogPreservesPersistedRouteMappings, TestResolveClaudeDesktopStartupCatalogUpdatesDefaultsAfterReconnect, TestResolveClaudeDesktopStartupCatalogUsesEffectiveEndpointMappings, TestResolveClaudeDesktopStartupCatalogUsesSafeFallback, TestResolveClaudeDesktopStartupCatalogVerifiesFallbackFromAccountInventory, TestResolveClaudeDesktopStartupCatalogVerifiesPersistedAccountCloudModel, TestRestoreClaudeAppForTerminationPreservesHandoffProfile, TestRestoreClaudeBeforeQuit, TestRunAppSyncBarrierDefersToNewerInstance, TestRunAppSyncBarrierRequiresSettledEmptyList, TestRunAppSyncBarrierStopsEveryOlderInstance, TestRunAppSyncBarrierStopsOlderInstances, TestSelectKnownClaudeDesktopModelsAllowsInstalledModelsOnly, TestSetClaudeDesktopAutoModeAvoidsUnnecessaryRestart, TestSetClaudeDesktopAutoModeCancelDoesNotSavePreference, TestSetClaudeDesktopAutoModeKeepsDesiredPreferenceAfterProfileFailure, TestSetClaudeDesktopAutoModePersistsUntilConnection, TestSetClaudeDesktopAutoModeRejectsUnsupportedSelection, TestSetClaudeDesktopAutoModeRewritesProfileBeforeRestart, TestSetClaudeDesktopConnectionForwardsRestartConfirmation, TestSetClaudeGatewayInstalledRejectsEmptyUsableCatalog, TestSetClaudeGatewayInstalledRejectsMissingClaude, TestUpdateClaudeDesktopProfileDefersRepairWhileClaudeRuns, TestUpdateClaudeDesktopProfileRepairsExistingConnectionOnce, TestValidateClaudeDesktopModels, UsesOllamaGateway, useTestOllamaRequestSigner proxy.DefaultClaudeDesktopModels -> m.Run -> os.Exit -> useTestOllamaRequestSigner -> httptest.NewServer -> http.HandlerFunc -> r.URL.Query().Get -> r.URL.Query -> t.Fatalf -> r.URL.String -> r.URL.Query().Get -> r.URL.Query -> t.Fatal -> r.Header.Get -> t.Fatal -> w.Write -> server.Close -> server.Client -> t.Cleanup -> loadClaudeDesktopModels -> context.Background -> len -> t.Fatalf -> t.Fatal -> useTestOllamaRequestSigner -> httptest.NewServer -> http.HandlerFunc -> r.URL.Query().Get -> r.URL.Query -> t.Fatalf -> r.URL.String -> r.Header.Get -> t.Fatal -> w.Write -> server.Close -> server.Client -> t.Cleanup -> currentClaudeDesktopCloudModels -> context.Background -> t.Fatal -> len -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> useTestOllamaRequestSigner -> newSignedOllamaRequest -> context.Background -> claudeDesktopDownloadEndpoint -> t.Fatal -> t.Fatalf -> req.URL.Query -> query.Get -> query.Get -> query.Get -> t.Fatalf -> req.Header.Get -> t.Fatal -> t.Cleanup -> string -> newSignedOllamaRequest -> context.Background -> t.Fatal -> req.URL.RequestURI -> t.Fatalf -> errors.New -> t.Cleanup -> httptest.NewServer -> http.HandlerFunc -> server.Close -> server.Client -> t.Cleanup -> loadClaudeDesktopModels -> context.Background -> t.Fatalf -> t.Fatalf -> t.Fatal -> newSignedOllamaRequest -> context.Background -> claudeDesktopDownloadEndpoint -> t.Fatal -> t.Helper -> t.Cleanup -> t.Setenv -> t.TempDir -> resolveClaudeDesktopCatalog -> context.Background -> len -> len -> t.Fatalf -> len -> len -> launch.SaveClaudeDesktopModels -> t.Fatal -> resolveClaudeDesktopCatalog -> context.Background -> t.Fatalf -> len -> t.Fatalf -> len -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModels -> t.Fatal -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> len -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> sharedClaudeDesktopMappings -> t.Run -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModelMappings -> t.Fatal -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> t.Fatalf -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeDesktopRecommendationModelsForTest -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> len -> len -> t.Fatalf -> claudeDesktopModelsSupportAutoMode -> t.Fatal -> t.Setenv -> t.TempDir -> claudeDesktopRecommendationModelsForTest -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Helper -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> t.Fatal -> t.Fatal -> t.Fatal -> resolveClaudeDesktopStartupCatalog -> context.Background -> t.Fatalf -> assertCatalog -> refreshClaudeDesktopCatalog -> context.Background -> t.Fatalf -> assertCatalog -> t.Run -> t.Setenv -> t.TempDir -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> proxy.DefaultClaudeDesktopMappings -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> t.Run -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModelMappings -> t.Fatal -> claudeDesktopRecommendationModelsForTest -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeDesktopRecommendationModelsForTest -> fallbackClaudeDesktopModels -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> proxy.ClaudeDesktopMappings -> t.Fatalf -> resolveClaudeDesktopStartupCatalog -> context.Background -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> t.Helper -> httptest.NewServer -> http.HandlerFunc -> json.NewEncoder().Encode -> json.NewEncoder -> server.Close -> http.NewRequest -> t.Fatal -> proxy.FetchClaudeDesktopModels -> server.Client -> t.Fatal -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModels -> t.Fatal -> fallbackClaudeDesktopModels -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> len -> len -> t.Fatalf -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> claudeDesktopModelsSupportAutoMode -> t.Fatal -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModels -> t.Fatal -> t.Fatal -> t.Cleanup -> resolveClaudeDesktopStartupCatalog -> context.Background -> len -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> time.Unix -> proxy.ClaudeDesktopModelsFromRecommendations -> refreshClaudeDesktopCatalog -> context.Background -> len -> t.Fatalf -> initial[0].GatewayID -> now.Add -> refreshClaudeDesktopCatalog -> context.Background -> t.Fatalf -> len -> t.Fatalf -> updated[0].GatewayID -> t.Fatalf -> updated[0].GatewayID -> t.Setenv -> t.TempDir -> claudeDesktopRecommendationModelsForTest -> proxy.MapClaudeDesktopModels -> claudeProxyMu.Lock -> time.Now -> claudeProxyMu.Unlock -> fallbackClaudeDesktopModels -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> refreshClaudeDesktopCatalog -> context.Background -> t.Fatalf -> proxy.ClaudeDesktopMappings -> maps.Equal -> t.Fatalf -> proxy.DefaultClaudeDesktopMappingsForModels -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> time.Unix -> proxy.ClaudeDesktopModelsFromRecommendations -> refreshClaudeDesktopCatalog -> context.Background -> now.Add -> refreshClaudeDesktopCatalog -> context.Background -> len -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> time.Unix -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.DefaultClaudeDesktopModels -> refreshClaudeDesktopCatalog -> context.Background -> now.Add -> refreshClaudeDesktopCatalog -> context.Background -> len -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> proxy.DefaultClaudeDesktopModels -> proxy.SelectClaudeDesktopModels -> includeSelectedClaudeDesktopModels -> len -> t.Fatalf -> proxy.DefaultClaudeDesktopModels -> selectKnownClaudeDesktopModels -> t.Fatal -> len -> t.Fatalf -> selectKnownClaudeDesktopModels -> t.Fatal -> len -> t.Fatalf -> selectKnownClaudeDesktopModels -> t.Fatal -> proxy.ClaudeDesktopModelsFromCloudInventory -> selectKnownClaudeDesktopModels -> append -> t.Fatal -> len -> t.Fatalf -> selectKnownClaudeDesktopModels -> t.Fatal -> len -> t.Fatalf -> make -> proxy.ClaudeDesktopRoutes -> mapKnownClaudeDesktopModels -> proxy.DefaultClaudeDesktopModels -> sharedClaudeDesktopMappings -> t.Fatal -> len -> t.Fatalf -> t.Fatalf -> mapKnownClaudeDesktopModels -> proxy.DefaultClaudeDesktopModels -> t.Fatal -> len -> sparse[0].GatewayID -> t.Fatalf -> proxy.DefaultClaudeDesktopMappings -> t.Run -> proxy.DefaultClaudeDesktopMappingsForModels -> proxy.DefaultClaudeDesktopModels -> maps.Equal -> t.Fatalf -> errors.New -> launch.ClaudeDesktopModels -> t.Cleanup -> setClaudeDesktopConnection -> strings.Contains -> err.Error -> t.Fatalf -> setClaudeDesktopConnection -> t.Fatalf -> t.Fatal -> change -> launch.ClaudeDesktopModels -> t.Cleanup -> updateClaudeDesktopProfile -> t.Fatal -> t.Fatalf -> updateClaudeDesktopProfile -> t.Fatal -> t.Fatalf -> t.Cleanup -> updateClaudeDesktopProfile -> t.Fatal -> t.Fatalf -> t.Setenv -> t.TempDir -> t.Fatal -> t.Cleanup -> setClaudeDesktopAutoMode -> t.Fatal -> launch.ClaudeDesktopAutoModeEnabled -> t.Fatal -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopAutoMode -> t.Fatal -> mergeClaudeDesktopCloudInventory -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Fatal -> t.Cleanup -> setClaudeDesktopAutoMode -> t.Fatal -> t.Fatalf -> t.Setenv -> t.TempDir -> t.Cleanup -> setClaudeDesktopAutoMode -> t.Fatal -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopAutoMode -> t.Fatal -> t.Cleanup -> setClaudeDesktopAutoMode -> errors.Is -> t.Fatalf -> launch.ClaudeDesktopAutoModeEnabled -> t.Fatal -> t.Fatalf -> t.Setenv -> t.TempDir -> errors.New -> t.Cleanup -> setClaudeDesktopAutoMode -> strings.Contains -> err.Error -> t.Fatalf -> launch.ClaudeDesktopAutoModeEnabled -> t.Fatal -> t.Fatal -> t.Fatal -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.ClaudeDesktopModelsFromCloudInventory -> mergeClaudeDesktopCloudInventory -> proxy.SelectClaudeDesktopModels -> proxy.SelectClaudeDesktopModels -> fallbackClaudeDesktopModels -> t.Run -> claudeDesktopModelsSupportAutoMode -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopAutoMode -> t.Fatal -> proxy.SelectClaudeDesktopModels -> t.Cleanup -> setClaudeDesktopAutoMode -> strings.Contains -> err.Error -> t.Fatalf -> launch.ClaudeDesktopAutoModeEnabled -> t.Fatal -> t.Fatal -> t.Setenv -> t.TempDir -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> stopClaudeAppProxy -> applyClaudeDesktopMappings -> sharedClaudeDesktopMappings -> t.Fatal -> t.Fatal -> t.Fatal -> launch.ClaudeDesktopModels -> slices.Equal -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> applyClaudeDesktopMappings -> sharedClaudeDesktopMappings -> errors.Is -> t.Fatalf -> len -> launch.ClaudeDesktopModelMappings -> t.Fatalf -> launch.ClaudeDesktopModelMappings -> t.Setenv -> t.TempDir -> sharedClaudeDesktopMappings -> launch.SaveClaudeDesktopModelMappings -> t.Fatal -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> applyClaudeDesktopMappings -> t.Fatalf -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModels -> t.Fatal -> proxy.SelectClaudeDesktopModels -> proxy.DefaultClaudeDesktopModels -> proxy.NewClaudeDesktop -> t.Fatal -> claudeProxyMu.Lock -> proxy.DefaultClaudeDesktopModels -> claudeCatalogNow -> claudeProxyMu.Unlock -> errors.New -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> applyClaudeDesktopMappings -> sharedClaudeDesktopMappings -> strings.Contains -> err.Error -> t.Fatalf -> launch.ClaudeDesktopModels -> slices.Equal -> t.Fatalf -> slices.Equal -> t.Fatalf -> gateway.Models -> len -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModels -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Cleanup -> stopClaudeAppProxy -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> applyClaudeDesktopMappings -> sharedClaudeDesktopMappings -> t.Fatal -> t.Fatalf -> launch.ClaudeDesktopModels -> slices.Equal -> t.Fatalf -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Fatal -> t.Setenv -> t.TempDir -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> launch.SaveClaudeDesktopModels -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> proxy.DefaultClaudeDesktopModels -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> proxy.DefaultClaudeDesktopMappings -> resetClaudeDesktopMappings -> t.Fatalf -> t.Fatalf -> launch.ClaudeDesktopModelMappings -> maps.Equal -> t.Fatalf -> stopClaudeAppProxy -> proxy.DefaultClaudeDesktopMappings -> resetClaudeDesktopMappings -> t.Fatalf -> t.Fatalf -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Fatal -> launch.ClaudeDesktopModelMappings -> maps.Equal -> t.Fatalf -> t.Setenv -> t.TempDir -> launch.SaveClaudeDesktopModelMappings -> t.Fatal -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> claudeDesktopRecommendationModelsForTest -> t.Cleanup -> appStore.Close -> resetClaudeDesktopMappings -> t.Fatalf -> launch.ClaudeDesktopModelMappings -> maps.Equal -> t.Fatalf -> testResetClaudeDesktopMappingsSerializesLifecycleChange -> setClaudeDesktopConnection -> testResetClaudeDesktopMappingsSerializesLifecycleChange -> restoreClaudeAppForTermination -> context.Background -> t.Helper -> t.Setenv -> t.TempDir -> sharedClaudeDesktopMappings -> launch.SaveClaudeDesktopModelMappings -> t.Fatal -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> proxy.MapClaudeDesktopModels -> proxy.DefaultClaudeDesktopModels -> proxy.NewClaudeDesktop -> t.Fatal -> claudeProxyMu.Lock -> proxy.DefaultClaudeDesktopModels -> claudeCatalogNow -> claudeProxyMu.Unlock -> make -> make -> close -> proxy.DefaultClaudeDesktopModels -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> make -> resetClaudeDesktopMappings -> time.After -> t.Fatal -> make -> make -> close -> change -> time.After -> close -> time.After -> t.Fatal -> t.Fatalf -> t.Fatalf -> t.Fatal -> time.After -> t.Fatalf -> t.Fatalf -> t.Fatalf -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Fatalf -> t.Setenv -> t.TempDir -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> errors.New -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> stopClaudeAppProxy -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> applyClaudeDesktopMappings -> sharedClaudeDesktopMappings -> strings.Contains -> err.Error -> t.Fatalf -> launch.ClaudeDesktopModelMappings -> maps.Equal -> sharedClaudeDesktopMappings -> t.Fatalf -> t.Setenv -> t.TempDir -> t.Cleanup -> applyClaudeDesktopMappings -> strings.Contains -> err.Error -> t.Fatalf -> t.Fatal -> t.Cleanup -> applyClaudeDesktopMappings -> strings.Contains -> err.Error -> t.Fatalf -> filepath.Join -> t.TempDir -> t.Cleanup -> appStore.Close -> hasUsedClaudeDesktopIntegration -> t.Fatal -> markClaudeDesktopIntegrationUsed -> t.Fatal -> hasUsedClaudeDesktopIntegration -> t.Fatal -> t.Setenv -> t.TempDir -> t.Setenv -> launch.SaveClaudeDesktopModels -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> filepath.Join -> t.TempDir -> t.Fatal -> t.Fatal -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> prepareClaudeDesktopConnection -> t.Fatal -> getClaudeDesktopConnectionSummary -> t.Fatalf -> t.Fatalf -> setClaudeDesktopConnection -> t.Fatal -> getClaudeDesktopConnectionSummary -> t.Fatalf -> t.Fatalf -> useTestOllamaRequestSigner -> httptest.NewServer -> http.HandlerFunc -> http.Error -> server.Close -> server.Client -> t.Cleanup -> loadClaudeDesktopModels -> context.Background -> len -> t.Fatalf -> strings.Contains -> strings.ToLower -> t.Fatalf -> proxy.EvaluateClaudeDesktopModelAccess -> t.Fatalf -> t.Fatal -> errors.New -> errors.New -> t.Run -> resolveClaudeDesktopAccessState -> context.Background -> t.Fatalf -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.ClaudeDesktopModelsFromRecommendations -> t.Run -> validateClaudeDesktopModels -> t.Fatalf -> strings.Contains -> err.Error -> t.Fatalf -> errors.New -> t.Cleanup -> proxy.ClaudeDesktopModelsFromRecommendations -> ensureClaudeDesktopModelsAvailable -> context.Background -> t.Fatal -> t.Fatalf -> t.Cleanup -> proxy.DefaultClaudeDesktopModels -> proxy.DefaultClaudeDesktopMappings -> claudeDesktopRecommendationModelsForTest -> claudeDesktopRecommendationModelsForTest -> claudeDesktopRecommendationModelsForTest -> t.Run -> tt.catalog -> errors.New -> resolveClaudeDesktopDefaultMappings -> context.Background -> t.Fatalf -> t.Fatalf -> t.Fatal -> maps.Equal -> t.Fatalf -> t.Fatalf -> t.Run -> t.Setenv -> t.TempDir -> filepath.Join -> t.TempDir -> len -> launch.SaveClaudeDesktopModels -> t.Fatal -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> setClaudeGatewayInstalled -> strings.Contains -> err.Error -> t.Fatalf -> t.Fatal -> t.Fatal -> hasUsedClaudeDesktopIntegration -> t.Fatal -> claudeLocalModels -> context.Background -> t.Fatal -> strings.Join -> t.Fatalf -> claudeLocalModels -> context.Background -> t.Fatal -> len -> t.Fatalf -> errors.New -> claudeLocalModels -> context.Background -> errors.Is -> t.Fatalf -> t.Setenv -> t.TempDir -> t.Setenv -> launch.SaveClaudeDesktopModels -> t.Fatal -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> proxy.DefaultClaudeDesktopModels -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> startClaudeAppProxy -> t.Fatal -> t.Fatalf -> getClaudeDesktopConnectionStatus -> t.Fatalf -> len -> t.Fatalf -> t.Fatalf -> t.Fatalf -> claudeProxyMu.Lock -> claudeAppProxy.Models -> claudeProxyMu.Unlock -> len -> t.Fatalf -> t.Setenv -> t.TempDir -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> proxy.ClaudeDesktopModelsFromRecommendations -> proxy.MapClaudeDesktopModels -> proxy.NewClaudeDesktop -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> fallbackClaudeDesktopModels -> proxy.ClaudeDesktopModelsFromCloudInventory -> t.Cleanup -> gateway.Close -> context.Background -> appStore.Close -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> getClaudeDesktopConnectionStatus -> proxy.ClaudeDesktopMappings -> gateway.Models -> t.Fatalf -> t.Fatalf -> t.Fatal -> errors.New -> proxy.ClaudeDesktopModelsFromRecommendations -> t.Run -> t.Setenv -> t.TempDir -> t.Setenv -> launch.SaveClaudeDesktopModels -> t.Fatal -> filepath.Join -> t.TempDir -> markClaudeDesktopIntegrationUsed -> t.Fatal -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> t.Cleanup -> stopClaudeAppProxy -> appStore.Close -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> startClaudeAppProxy -> t.Fatal -> t.Fatalf -> getClaudeDesktopConnectionStatus -> make -> len -> slices.Equal -> t.Fatalf -> t.Fatalf -> claudeProxyMu.Lock -> claudeAppProxy.Models -> claudeProxyMu.Unlock -> len -> t.Fatalf -> t.Run -> process.sameProcess -> process.sameProcess -> t.Fatalf -> append -> runAppSyncBarrier -> t.Fatal -> slices.Equal -> t.Fatalf -> append -> append -> process.sameProcess -> runAppSyncBarrier -> t.Fatal -> slices.Equal -> t.Fatalf -> runAppSyncBarrier -> errors.Is -> t.Fatalf -> t.Fatal -> runAppSyncBarrier -> t.Fatal -> t.Fatalf -> errors.New -> errors.New -> fmt.Errorf -> fmt.Errorf -> fmt.Errorf -> t.Run -> continueAfterBarrierError -> t.Fatalf -> restoreClaudeBeforeQuit -> context.Background -> t.Fatal -> t.Fatal -> restoreClaudeBeforeQuit -> context.Background -> t.Fatal -> t.Fatal -> errors.New -> restoreClaudeBeforeQuit -> context.Background -> errors.Is -> t.Fatalf -> t.Cleanup -> restoreClaudeAppForTermination -> context.Background -> t.Fatal -> t.Fatalf -> t.Cleanup -> handleExistingInstance -> t.Fatal -> t.Fatal -> t.Cleanup -> handleExistingInstance -> t.Fatalf -> darwinAppProcessRunning -> t.Fatal -> t.Fatal -> t.Cleanup -> setClaudeGatewayInstalled -> strings.Contains -> err.Error -> t.Fatalf -> t.Fatal -> t.Cleanup -> getClaudeDesktopConnectionStatus -> t.Fatalf -> setClaudeDesktopConnection -> strings.Contains -> err.Error -> t.Fatalf -> prepareClaudeDesktopConnection -> strings.Contains -> err.Error -> t.Fatalf -> claudeProxyMu.Lock -> errors.New -> claudeProxyMu.Unlock -> t.Cleanup -> claudeProxyMu.Lock -> claudeProxyMu.Unlock -> getClaudeDesktopConnectionStatus -> t.Fatalf -> claudeDesktopInstallResultFromCode -> t.Errorf -> codexDesktopInstallResultFromCode -> t.Errorf -> t.Setenv -> t.Cleanup -> stopClaudeAppProxy -> startClaudeAppProxy -> strings.Contains -> err.Error -> t.Fatalf -> t.Fatal -> claudeGatewayStartFailed -> t.Fatal -> claudeGatewayPortConflict -> t.Fatal -> t.Cleanup -> claudeGatewayPort -> t.Fatal -> int -> ClaudeGatewayPort -> t.Fatalf -> int -> ClaudeGatewayPort -> t.Setenv -> t.Cleanup -> stopClaudeAppProxy -> claudeProxyMu.Lock -> clearClaudeProxyFailure -> claudeProxyMu.Unlock -> startClaudeAppProxy -> t.Fatalf -> claudeGatewayStartFailed -> claudeGatewayPortConflict -> t.Fatal -> t.Setenv -> t.TempDir -> setClaudeProxyRetry -> httptest.NewServer -> http.NotFoundHandler -> t.Cleanup -> conflict.Listener.Addr().String -> conflict.Listener.Addr -> t.Cleanup -> stopClaudeAppProxy -> startClaudeAppProxy -> t.Fatal -> claudeGatewayStartFailed -> t.Fatal -> claudeGatewayPortConflict -> t.Fatal -> conflict.Close -> startClaudeAppProxy -> t.Fatalf -> claudeGatewayStartFailed -> t.Fatal -> claudeGatewayPortConflict -> t.Fatal -> context.WithTimeout -> context.Background -> cancel -> proxy.ProbeClaudeDesktop -> t.Fatalf -> t.Setenv -> t.TempDir -> setClaudeProxyRetry -> httptest.NewServer -> http.HandlerFunc -> w.Header().Set -> w.Header -> w.WriteHeader -> spoof.Close -> spoof.Listener.Addr().String -> spoof.Listener.Addr -> t.Cleanup -> stopClaudeAppProxy -> startClaudeAppProxy -> t.Fatal -> claudeGatewayPortConflict -> t.Fatal -> t.Setenv -> t.TempDir -> setClaudeProxyRetry -> net.Listen -> t.Fatal -> listener.Addr().String -> listener.Addr -> t.Cleanup -> listener.Close -> stopClaudeAppProxy -> time.Sleep -> listener.Close -> startClaudeAppProxy -> t.Fatalf -> claudeGatewayStartFailed -> t.Fatal -> t.Helper -> t.Cleanup context, encoding/json, errors, fmt, github.com/ollama/ollama/api, github.com/ollama/ollama/app/store, github.com/ollama/ollama/cmd/launch, github.com/ollama/ollama/internal/proxy, maps, net, net/http, net/http/httptest, os, path/filepath, slices, sql:app, sql:Authorization, sql:gemma4:31b-cloud, sql:glm-5.2:cloud, sql:http://127.0.0.1:18080/, sql:kimi-k3:cloud, sql:offline, sql:qwen3:8b, sql:ts, sql:type, sql:{"models":[{"name":"glm-5.2:cloud"}, strings, testing, time, {"name":"qwen3:8b"}]} Globals{read=[TestMain, m, previousLoader, claudeModelsLoader, previousAccessResolver, claudeAccessStateResolver, previousLocalResolver, claudeLocalModelsResolver, previousCloudResolver, claudeCloudModelsResolver, proxy, Cloud, Account, Plan, code, os, TestLoadClaudeDesktopModelsUsesAppEndpoint, t, useTestOllamaRequestSigner, server, httptest, http, w, r, _, previousClient, claudeRecommendationsClient, previousEndpoint, claudeRecommendationsEndpoint, models, source, loadClaudeDesktopModels, context, TestCurrentClaudeDesktopCloudModelsUsesAccountEndpoint, claudeCloudModelsClient, claudeCloudModelsEndpoint, err, currentClaudeDesktopCloudModels, access, TestClaudeDesktopDownloadEndpointUsesTypedZipContract, req, newSignedOllamaRequest, claudeDesktopDownloadEndpoint, got, want, query, TestClaudeEndpointRequestsSignCompleteRequestURI, previousSigner, signOllamaData, endpoint, challenge, data, string, TestClaudeEndpointRequestsAreNotSentUnsigned, errors, called, model, previous, TestResolveClaudeDesktopCatalogUsesPersistedSelection, available, selected, resolveClaudeDesktopCatalog, launch, TestResolveClaudeDesktopStartupCatalogVerifiesPersistedAccountCloudModel, previousResolver, resolveClaudeDesktopStartupCatalog, TestResolveClaudeDesktopStartupCatalogPreservesPersistedRouteMappings, tests, name, mappings, state, sharedClaudeDesktopMappings, local, cloud, tt, previousAccess, previousLocal, previousCloud, maps, TestResolveClaudeDesktopStartupCatalogMarksDefaultAccountModelsAutoEligible, Model, RequiredPlan, claudeDesktopRecommendationModelsForTest, claudeDesktopModelsSupportAutoMode, TestClaudeDesktopCatalogListsAccountModelsWithoutChangingDefaults, recommendations, claudeProxyMu, previousAvailable, claudeAvailableModels, previousSource, claudeModelSource, previousUpdated, claudeCatalogUpdated, assertCatalog, refreshClaudeDesktopCatalog, TestResolveClaudeDesktopStartupCatalogUsesSafeFallback, states, TestResolveClaudeDesktopStartupCatalogUsesEffectiveEndpointMappings, saved, TestResolveClaudeDesktopStartupCatalogUpdatesDefaultsAfterReconnect, endpointModels, load, fallbackClaudeDesktopModels, offline, reconnected, json, Recommendations, Mappings, TestResolveClaudeDesktopStartupCatalogVerifiesFallbackFromAccountInventory, TestResolveClaudeDesktopStartupCatalogDoesNotListCloudWhenOff, TestRefreshClaudeDesktopCatalogUpdatesPolicyAndPreservesSlots, previousInterval, claudeCatalogRefreshInterval, previousNow, claudeCatalogNow, now, time, requiredPlan, initial, initialID, updated, TestRefreshClaudeDesktopCatalogDropsStaleDefaultsOnFallback, current, TestRefreshClaudeDesktopCatalogFailsClosedForRemovedSelection, TestRefreshClaudeDesktopCatalogDoesNotDowngradeEntitlementOnFallback, TestIncludeSelectedClaudeDesktopModelsKeepsCustomModels, includeSelectedClaudeDesktopModels, TestSelectKnownClaudeDesktopModelsAllowsInstalledModelsOnly, selectKnownClaudeDesktopModels, accountCloud, localNames, route, TestMapKnownClaudeDesktopModelsAllowsSharedModels, mapKnownClaudeDesktopModels, sparse, TestClaudeDesktopDefaultsDoNotDependOnAccountPlan, f, autoMode, installed, restart, TestSetClaudeDesktopConnectionForwardsRestartConfirmation, previousInstalled, claudeDesktopInstalled, previousDesktop, claudeDesktop, fake, configured, requireRestart, setClaudeDesktopConnection, strings, change, restartConfirmed, TestUpdateClaudeDesktopProfileRepairsExistingConnectionOnce, previousRunning, claudeDesktopRunning, updateClaudeDesktopProfile, TestUpdateClaudeDesktopProfileDefersRepairWhileClaudeRuns, TestSetClaudeDesktopAutoModePersistsUntilConnection, setClaudeDesktopAutoMode, enabled, TestSetClaudeDesktopAutoModeAvoidsUnnecessaryRestart, mergeClaudeDesktopCloudInventory, profileCurrent, TestSetClaudeDesktopAutoModeRewritesProfileBeforeRestart, running, TestSetClaudeDesktopAutoModeCancelDoesNotSavePreference, loadErr, TestSetClaudeDesktopAutoModeKeepsDesiredPreferenceAfterProfileFailure, configureErr, TestClaudeDesktopAutoModeModelEligibility, recommended, custom, tagOnly, TestSetClaudeDesktopAutoModeRejectsUnsupportedSelection, TestApplyClaudeDesktopMappingsPersistsSelection, previousAddr, claudeProxyListenAddr, stopClaudeAppProxy, applyClaudeDesktopMappings, slices, TestApplyClaudeDesktopMappingsRequiresLiveRestartConfirmation, previousGateway, claudeAppProxy, applied, TestApplyClaudeDesktopMappingsDoesNotRestartWithoutChanges, TestApplyClaudeDesktopMappingsRollsBackWhenRestartFails, gateway, ListenAddr, OllamaURL, Models, setErr, gotModels, TestApplyClaudeDesktopMappingsStartsClaudeWhenStopped, TestResetClaudeDesktopMappingsDoesNotOpenStoppedClaude, previousStore, appStore, DBPath, filepath, markClaudeDesktopIntegrationUsed, plan, defaultMappings, resetClaudeDesktopMappings, disconnectedMappings, TestResetClaudeDesktopMappingsPreservesSavedMappingsForEmptyContract, empty, TestResetClaudeDesktopMappingsSerializesDisconnectDuringCatalogRefresh, testResetClaudeDesktopMappingsSerializesLifecycleChange, TestResetClaudeDesktopMappingsSerializesShutdownDuringCatalogRefresh, restoreClaudeAppForTermination, previousMappings, configureOnSet, refreshStarted, releaseRefresh, loaderCalls, resetDone, changeStarted, changeDone, completedEarly, reset, activeGateway, TestApplyClaudeDesktopMappingsKeepsCommittedMappingsWhenOpenFails, openErr, TestApplyClaudeDesktopMappingsRejectsUnknownRoute, TestApplyClaudeDesktopMappingsRejectsEmptyMapping, TestClaudeDesktopIntegrationHistoryPersists, hasUsedClaudeDesktopIntegration, TestPrepareClaudeDesktopConnectionPreservesFirstUseIntro, localCalls, clearClaudeProxyFailure, prepareClaudeDesktopConnection, preparationLocalCalls, prepared, getClaudeDesktopConnectionSummary, continued, TestLoadClaudeDesktopModelsFallsBackWithoutMLX, TestResolveClaudeDesktopAccessState, whoami, Name, StatusCode, cloudStatus, Disabled, resolveClaudeDesktopAccessState, TestValidateClaudeDesktopModels, free, pro, inventoryKnown, wantError, validateClaudeDesktopModels, TestEnsureClaudeDesktopModelsAvailableRetriesStartupRace, previousRetryWait, claudeAccessRetryWait, previousRetryPoll, claudeAccessRetryPoll, calls, ensureClaudeDesktopModelsAvailable, TestResolveClaudeDesktopDefaultMappingsUsesContractWithoutAccountLookup, catalog, wantDefaults, accessCalls, gotDefaults, resolveClaudeDesktopDefaultMappings, TestSetClaudeGatewayInstalledRejectsEmptyUsableCatalog, selection, setClaudeGatewayInstalled, TestClaudeLocalModels, claudeLocalModels, RemoteModel, RemoteHost, wantErr, TestClaudeGatewayStartupWithLocalSelectionSkipsCloudLookupsButSettingsLoadsCatalog, startClaudeAppProxy, status, getClaudeDesktopConnectionStatus, foundCloud, foundSelectedLocal, mapping, TestClaudeDesktopConnectionStatusPrefersActiveGatewayMappings, activeCatalog, activeModels, TestClaudeGatewayLocalSelectionCatalogPolicy, wantSettingsModels, accessErr, wantLoaderCalls, gotSettingsModels, i, wantAccessCalls, TestRunAppSyncBarrierStopsOlderInstances, test, exitOn, appProcessStopForHandoff, wantStops, appProcessStopGracefully, appProcessStopForcefully, pid, startedAt, older, alive, stops, controller, discover, stop, mode, runAppSyncBarrier, killTimeout, pollInterval, TestRunAppSyncBarrierStopsEveryOlderInstance, graceful, stubborn, late, lateDiscovered, processes, TestRunAppSyncBarrierDefersToNewerInstance, newer, stopped, errNewerAppInstance, TestRunAppSyncBarrierRequiresSettledEmptyList, queries, TestContinueAfterBarrierErrorOnlyBlocksNewerInstance, fmt, continueAfterBarrierError, TestRestoreClaudeBeforeQuit, restoreClaudeBeforeQuit, TestRestoreClaudeAppForTerminationPreservesHandoffProfile, TestHandleExistingInstanceSkipsDevelopmentBuild, oldIsApp, isApp, oldKillOtherInstances, killOtherInstances, handleExistingInstance, TestHandleExistingInstanceReturnsBarrierResult, TestDarwinAppProcessRunningReportsExitedProcess, darwinAppProcessRunning, TestSetClaudeGatewayInstalledRejectsMissingClaude, TestClaudeDesktopConnectionStatusReportsMissingApp, TestClaudeDesktopConnectionStatusKeepsConfiguredStateOnGatewayFailure, previousErr, claudeProxyErr, previousFailure, claudeProxyFail, claudeProxyFailurePortConflict, TestClaudeDesktopInstallResultFromCode, claudeDesktopInstallCancelled, claudeDesktopInstallerOpened, claudeDesktopInstallFailed, claudeDesktopInstallResultFromCode, TestCodexDesktopInstallResultFromCode, codexDesktopInstallCancelled, codexDesktopInstallerOpened, codexDesktopInstallFailed, codexDesktopInstallResultFromCode, TestClaudeGatewayRejectsOllamaHostPortConflict, claudeGatewayStartFailed, claudeGatewayPortConflict, TestClaudeGatewayPortTracksListenAddress, port, claudeGatewayPort, ClaudeGatewayPort, TestClaudeGatewayDoesNotReportPortConflictWithoutClaude, TestClaudeGatewayRecoversAfterPortConflict, setClaudeProxyRetry, conflict, addr, ctx, cancel, TestClaudeGatewayRejectsSpoofedExistingGateway, spoof, TestClaudeGatewayWaitsForPreviousListenerToExit, listener, net, wait, poll, previousWait, claudeProxyRetryWait, previousPoll, claudeProxyRetryPoll]}; Database{reads=[app via gorm|Authorization via gorm|gemma4:31b-cloud via gorm|glm-5.2:cloud via gorm|http://127.0.0.1:18080/ via gorm|kimi-k3:cloud via gorm|offline via gorm|qwen3:8b via gorm|ts via gorm|type via gorm|{"models":[{"name":"glm-5.2:cloud"},{"name":"qwen3:8b"}]} via gorm]} 3064 database table read: app, database table read: Authorization, database table read: gemma4:31b-cloud, database table read: glm-5.2:cloud, database table read: http://127.0.0.1:18080/, database table read: kimi-k3:cloud, database table read: offline, database table read: qwen3:8b, database table read: ts, database table read: type, database table read: {"models":[{"name":"glm-5.2:cloud"}, file open, http request, {"name":"qwen3:8b"}]} file write SideEffects{DATABASE:read; LOG:console; NETWORK; NON_DETERMINISTIC; STATE:global; STATE:module; TIMER} "", errors.New("signing unavailable") | "test-public-key:test-signature", nil | &api.ListResponse{Models: []api.ListModelResponse{ {Name: "qwen3.8:27b-mlx", ... | &api.StatusResponse{Cloud: api.CloudStatus{Disabled: true}}, nil | &api.StatusResponse{}, nil | &api.UserResponse{Name: "parth", Plan: "pro"}, nil | &api.UserResponse{Name: "parth"}, nil | &api.UserResponse{}, nil | []appProcessIdentity{newer}, nil | []appProcessIdentity{older}, nil | []string{"qwen3:8b"}, nil | alive && process.sameProcess(older), nil | alive[process], nil | claudeDesktopRecommendationModelsForTest(t, []api.ModelRecommendation{ {Mod... | claudeDesktopRecommendationModelsForTest(t, []api.ModelRecommendation{{Model: "g... | endpointModels, "endpoint" | err | errors.New("Claude Desktop restart confirmation is required before changing its ... | f.configureErr | f.configured | f.configured && f.profileCurrent && f.autoMode == autoMode | f.openErr | f.running | f.setErr | fallbackClaudeDesktopModels(), "fallback" | false | launch.ErrClaudeDesktopRestartConfirmationRequired | mappings | models | models, "endpoint" | nil | nil, "" | nil, api.AuthorizationError{StatusCode: http.StatusUnauthorized} | nil, errors.New("account service unavailable") | nil, errors.New("status unavailable") | nil, nil | nil, wantErr | now | processes, nil | proxy.ClaudeDesktopAccessState{ Cloud: proxy.ClaudeDesktopCloudOn, Accou... | proxy.ClaudeDesktopAccessState{Cloud: proxy.ClaudeDesktopCloudOff}, nil | proxy.ClaudeDesktopAccessState{Cloud: proxy.ClaudeDesktopCloudOn, Account: proxy... | proxy.ClaudeDesktopAccessState{Cloud: proxy.ClaudeDesktopCloudOn}, nil | proxy.ClaudeDesktopAccessState{}, errors.New("account lookup must not run") | proxy.ClaudeDesktopAccessState{}, errors.New("server starting") | proxy.ClaudeDesktopAccessState{}, nil | proxy.ClaudeDesktopModelsFromCloudInventory([]string{ "glm-5.3-flash:cloud", ... | proxy.ClaudeDesktopModelsFromCloudInventory([]string{ "glm-5.3-flash:cloud", ... | proxy.ClaudeDesktopModelsFromCloudInventory([]string{"custom:cloud"}), nil | proxy.ClaudeDesktopModelsFromCloudInventory([]string{"glm-5.2"}), nil | proxy.ClaudeDesktopModelsFromCloudInventory([]string{"glm-5.3-flash:cloud", "gem... | proxy.ClaudeDesktopModelsFromCloudInventory([]string{"kimi-k3:cloud"}), nil | proxy.ClaudeDesktopModelsFromCloudInventory(tt.cloud), nil | proxy.ClaudeDesktopModelsFromRecommendations([]api.ModelRecommendation{{Model: "... | proxy.ClaudeDesktopModelsFromRecommendations([]api.ModelRecommendation{{Model: n... | proxy.DefaultClaudeDesktopModels() | proxy.DefaultClaudeDesktopModels(), "endpoint" | proxy.DefaultClaudeDesktopModels(), "fallback" | recommendations, "endpoint" | restoreClaudeAppForTermination(context.Background(), false) | server.URL | server.URL + "/api/experimental/model-recommendations?app=claude-desktop" | server.URL + "/api/tags" | setClaudeDesktopConnection(false, false) | true | true, nil | tt.access, tt.accessErr | tt.catalog(t), "endpoint" | tt.local, nil | tt.recommendations, "endpoint" | tt.state, nil | void | want | wantErr 980 go/backend present (panic/exit paths) net/http, requests database, persistence
app cmd app app_test.go .go 4725 4.614258 0.004506 Functions: TestShouldShowOnboarding, TestDispatchURLSchemeRequest, TestRunInitialWindowsUIWithBareURL, TestRunInitialWindowsUIWithAppsURL, TestRunInitialWindowsUIRoutesInteractiveLaunch โ€” [Pure, Stateless] Tags: Pure, Stateless Provenance{dependencies:language-import confidence=high} TestDispatchURLSchemeRequest, TestRunInitialWindowsUIRoutesInteractiveLaunch, TestRunInitialWindowsUIWithAppsURL, TestRunInitialWindowsUIWithBareURL, TestShouldShowOnboarding errors.New -> t.Run -> shouldShowOnboarding -> t.Fatalf -> t.Run -> dispatchURLSchemeRequest -> t.Fatalf -> t.Errorf -> t.Errorf -> t.Errorf -> runInitialWindowsUI -> dispatchURLSchemeRequest -> t.Fatal -> t.Fatal -> t.Fatalf -> t.Fatalf -> t.Errorf -> t.Errorf -> t.Errorf -> runInitialWindowsUI -> t.Fatal -> dispatchURLSchemeRequest -> t.Fatal -> t.Fatal -> t.Fatalf -> t.Fatal -> t.Fatalf -> t.Run -> runInitialWindowsUI -> t.Fatal -> t.Fatal -> t.Fatalf errors, github.com/ollama/ollama/app/store, testing Globals{read=[TestShouldShowOnboarding, t, tests, name, settings, OnboardingVersion, want, store, err, errors, _, tt, got, shouldShowOnboarding, TestDispatchURLSchemeRequest, request, wantOpen, wantApps, wantConnect, wantErr, connected, opened, openedApps, dispatchURLSchemeRequest, TestRunInitialWindowsUIWithBareURL, hiddenCalls, urlCalls, onboardingCalls, openCalls, runInitialWindowsUI, path, TestRunInitialWindowsUIWithAppsURL, appsCalls, TestRunInitialWindowsUIRoutesInteractiveLaunch, showOnboarding, wantPath, gotPath]} 169 PURE 43 go/cli present (panic/exit paths) pure, stateless
app cmd app app_windows.go .go 11466 11.197266 0.010935 Functions: init, maybeMoveAndRestart, handleExistingInstance, installSymlink, UIRun โ€” [Authentication, Channels, Concurrent, Error Handling, Event-Driven, Factory Pattern, File IO, Logging, Stateful, Threads, Validator] Tags: Authentication, Channels, Concurrent, Error Handling, Event-Driven, Factory Pattern, File IO, Logging, Stateful, Threads, Validator Provenance{dependencies:language-import confidence=high}; Provenance{dependencies:database-metadata confidence=high}; Provenance{dataFlow:database-metadata confidence=high}; Provenance{inputSources:database-metadata confidence=high}; Provenance{sideEffects:database-metadata confidence=high} centerWindow, checkAndHandleExistingInstance, createLoginShortcut, doubleClick, DoUpdate, drag, handleExistingInstance, HandleURLScheme, handleURLSchemeRequest, hideWindow, init, installSymlink, LaunchNewApp, logStartup, maybeMoveAndRestart, openAppsUI, openUI, osRun, Quit, quit, runInBackground, setOnboardingWindowStyle, showWindow, UIOnboarding, UIRun, UIRunning, UIShow, UITerminate, UpdateAvailable windows.NewLazySystemDLL -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> u32.NewProc -> filepath.Join -> os.Getenv -> filepath.Join -> os.Getenv -> filepath.Join -> os.Getenv -> os.Executable -> slog.Warn -> filepath.Dir -> filepath.Join -> os.Stat -> os.Getwd -> slog.Warn -> filepath.Join -> filepath.Join -> os.Stat -> slog.Info -> wintray.CheckAndFocusExistingInstance -> slog.Info -> os.Exit -> wv.Run -> openUI -> wv.IsRunning -> showWindow -> wv.webview.Window -> wv.Run -> wv.Run -> wv.Terminate -> wv.IsRunning -> wv.OnboardingActive -> app.t.Quit -> wv.Terminate -> wv.Terminate -> slog.Info -> app.shutdown -> updater.DoUpgrade -> slog.Warn -> fmt.Sprintf -> handleURLSchemeRequest -> handleURLSchemeInCurrentInstance -> slog.Debug -> app.t.UpdateAvailable -> wintray.NewTray -> log.Fatalf -> updater.IsUpdatePending -> slog.Debug -> UpdateAvailable -> make -> signal.Notify -> slog.Debug -> app.t.Quit -> wv.Terminate -> windows.GetStartupInfo -> slog.Debug -> windows.UTF16PtrToString -> strings.Contains -> runInitialWindowsUI -> wv.Run -> app.t.GetIconHandle -> uintptr -> pSendMessage.Call -> uintptr -> uintptr -> uintptr -> pSendMessage.Call -> uintptr -> uintptr -> uintptr -> centerWindow -> createLoginShortcut -> slog.Warn -> app.t.TrayRun -> filepath.Join -> os.Stat -> errors.Is -> os.Open -> fmt.Errorf -> in.Close -> os.Create -> fmt.Errorf -> out.Close -> io.Copy -> fmt.Errorf -> out.Sync -> fmt.Errorf -> slog.Info -> slog.Warn -> slog.Debug -> slog.Info -> uintptr -> pGetWindowRect.Call -> uintptr -> unsafe.Pointer -> pGetSystemMetrics.Call -> uintptr -> pGetSystemMetrics.Call -> uintptr -> int32 -> int32 -> pSetWindowPos.Call -> uintptr -> uintptr -> uintptr -> uintptr -> uintptr -> uintptr -> uintptr -> app.t.GetIconHandle -> pSendMessage.Call -> uintptr -> uintptr -> uintptr -> pSendMessage.Call -> uintptr -> uintptr -> uintptr -> pIsIconic.Call -> pShowWindow.Call -> uintptr -> pShowWindow.Call -> uintptr -> pBringWindowToTop.Call -> pSetForegroundWindow.Call -> pSetActiveWindow.Call -> pSetWindowPos.Call -> uintptr -> uintptr -> uintptr -> pShowWindow.Call -> uintptr -> os.Executable -> slog.Error -> os.Exit -> exec.Command -> cmd.Run -> slog.Error -> os.Exit -> slog.Error -> os.Exit -> wintray.CheckAndSendToExistingInstance -> os.Exit errors, fmt, github.com/ollama/ollama/app/updater, github.com/ollama/ollama/app/version, github.com/ollama/ollama/app/wintray, golang.org/x/sys/windows, io, log, log/slog, os, os/exec, os/signal, path/filepath, runtime, sql:/, sql:/connect, sql:APPDATA, sql:BringWindowToTop, sql:GetSystemMetrics, sql:GetWindowRect, sql:IsIconic, sql:LOCALAPPDATA, sql:SendMessageA, sql:SetActiveWindow, sql:SetForegroundWindow, sql:SetWindowPos, sql:ShowWindow, sql:User32.dll, strings, syscall, unsafe Globals{read=[u32, windows, pBringWindowToTop, pShowWindow, pSendMessage, pGetSystemMetrics, pGetWindowRect, pSetWindowPos, pSetForegroundWindow, pSetActiveWindow, pIsIconic, appPath, filepath, os, appLogPath, startupShortcut, ollamaPath, DesktopAppName, init, exe, err, slog, _, pwd, distAppPath, runtime, distOllamaPath, maybeMoveAndRestart, handleExistingInstance, startHidden, wintray, installSymlink, app, ac, path, wv, openUI, showWindow, openAppsUI, quit, updater, fmt, urlScheme, handleURLSchemeRequest, handleURLSchemeInCurrentInstance, UpdateAvailable, ver, osRun, shutdown, hasCompletedFirstRun, showOnboarding, urlSchemeRequest, log, signals, signal, syscall, STARTF_TITLEISLINKNAME, info, linkPath, strings, runInitialWindowsUI, startHiddenTasks, ptr, iconHandle, hwnd, uintptr, ICON_SMALL, ICON_BIG, WM_SETICON, centerWindow, createLoginShortcut, shortcutOrigin, errors, in, out, io, LaunchNewApp, logStartup, version, SW_HIDE, SW_SHOW, SW_SHOWNA, SW_MINIMIZE, SW_RESTORE, SW_SHOWDEFAULT, SM_CXSCREEN, SM_CYSCREEN, HWND_TOP, SWP_NOSIZE, SWP_NOMOVE, SWP_NOZORDER, SWP_SHOWWINDOW, MF_STRING, MF_SEPARATOR, MF_GRAYED, TPM_RETURNCMD, rect, unsafe, screenWidth, screenHeight, windowWidth, windowHeight, x, int32, y, isMinimized, hideWindow, setOnboardingWindowStyle, runInBackground, cmd, exec, drag, doubleClick, checkAndHandleExistingInstance]}; Database{reads=[/ via gorm|/connect via gorm|APPDATA via gorm|BringWindowToTop via gorm|GetSystemMetrics via gorm|GetWindowRect via gorm|IsIconic via gorm|LOCALAPPDATA via gorm|SendMessageA via gorm|SetActiveWindow via gorm|SetForegroundWindow via gorm|SetWindowPos via gorm|ShowWindow via gorm|User32.dll via gorm]} 378 database table read: /, database table read: /connect, database table read: APPDATA, database table read: BringWindowToTop, database table read: GetSystemMetrics, database table read: GetWindowRect, database table read: IsIconic, database table read: LOCALAPPDATA, database table read: SendMessageA, database table read: SetActiveWindow, database table read: SetForegroundWindow, database table read: SetWindowPos, database table read: ShowWindow, database table read: User32.dll, file open printf SideEffects{CONFIG; DATABASE:read; FILE:read; FILE:write; LOG:console; STATE:global} 0 | app.t.UpdateAvailable(ver) | fmt.Errorf("unable to copy shortcut %s : %w", startupShortcut, err) | fmt.Errorf("unable to open shortcut %s : %w", shortcutOrigin, err) | fmt.Errorf("unable to open startup link %s : %w", startupShortcut, err) | fmt.Errorf("unable to sync shortcut %s : %w", startupShortcut, err) | nil | true | void | wv.IsRunning() | wv.OnboardingActive() 174 go/cli present (panic/exit paths) requests database, persistence
app cmd app claude_desktop_bindings_darwin.go .go 2834 2.767578 0.002703 Functions: bindClaudeDesktop โ€” [Pure, Stateless] Tags: Pure, Stateless Provenance{dependencies:language-import confidence=high} bindClaudeDesktop wv.Bind -> getClaudeDesktopConnectionSummary -> wv.Bind -> claudeDesktopRequestCount -> wv.Bind -> setClaudeDesktopConnection -> getClaudeDesktopConnectionSummary -> err.Error -> wv.Bind -> prepareClaudeDesktopConnection -> getClaudeDesktopConnectionSummary -> err.Error -> wv.Bind -> openClaudeDesktopApplication -> err.Error -> wv.Bind -> requestClaudeDesktopInstall -> wv.Bind -> applyClaudeDesktopMappings -> getClaudeDesktopConnectionStatus -> err.Error -> errors.Is -> wv.Bind -> resetClaudeDesktopMappings -> getClaudeDesktopConnectionStatus -> err.Error -> errors.Is -> wv.Bind -> setClaudeDesktopAutoMode -> getClaudeDesktopConnectionStatus -> err.Error -> errors.Is -> wv.Bind -> getShowAppsInMenu -> wv.Bind -> setShowAppsInMenu errors, github.com/ollama/ollama/app/webview, github.com/ollama/ollama/cmd/launch Globals{read=[bindClaudeDesktop, wv, getClaudeDesktopConnectionSummary, claudeDesktopRequestCount, enabled, restartConfirmed, err, setClaudeDesktopConnection, result, Status, prepareClaudeDesktopConnection, openClaudeDesktopApplication, requestClaudeDesktopInstall, mappings, applied, applyClaudeDesktopMappings, getClaudeDesktopConnectionStatus, MappingsApplied, errors, launch, resetClaudeDesktopMappings, setClaudeDesktopAutoMode, getShowAppsInMenu, visible, setShowAppsInMenu]} 83 PURE "" | claudeDesktopRequestCount() | err.Error() | getClaudeDesktopConnectionSummary() | getShowAppsInMenu() | requestClaudeDesktopInstall() | result 23 go/cli present pure, stateless