From 6acf5ee5c38865eae2fe47e879905120b2ca272c Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 13 Nov 2026 00:11:33 +0800 Subject: [PATCH] providers: StepFun's logo is the current mark, five squares in a circle (zzstar101 on X) magpie drew StepFun's old stepped-S in blue. StepFun's own sources show the new mark: stepfun.com's favicon (step_favicon.svg), the Hugging Face org avatar of stepfun-ai (the step-5-preview card), and lobe-icons' `stepfun` (mono). lobe's `stepfun-color` is still the old mark, so there is no colour one to take; the mark is one tone, so it is stored as the mono icons are (icons/stepfun.svg, currentColor, drawn as a mask that follows light and dark). The presets (StepFun, StepFun China), the "step" model-maker rule (IconForCatalog's table) and Step Code use "stepfun". A provider saved with "stepfun-color" keeps working: that file now holds the same new mark in black, which the one-tone check draws as a mask too. Run (mote): go test of internal/provider and internal/agent ok; go test -tags nogui ./internal/gui ok; GUI files stepfun-per-provider, icon-one-tone, mono-icon-redraw, models-add-and-icons, icon-tile, nav-sub-icons ok in chromium and webkit; a screenshot of the Providers list in chromium and webkit, light and dark, shows the new mark for both icon names. usage-cards-hide's "de 560" sideways scroll is red in chromium and webkit, and the same on origin/main aa744b9ed without this change (#6294). Broken by hand: the old mark in stepfun.svg makes TestStepFunLogoIsTheCurrentMark red. Not tried: the Linux WebKitGTK window; the full suite before the tag. --- internal/agent/icons.go | 2 +- internal/agent/stepcode.go | 2 +- internal/gui/assets/icons/stepfun-color.svg | 2 +- internal/gui/assets/icons/stepfun.svg | 1 + internal/provider/icon_catalog_list_test.go | 4 +-- internal/provider/presets.go | 4 +-- internal/provider/stepfun_accounts_test.go | 2 +- internal/provider/stepfun_logo_test.go | 29 +++++++++++++++++++++ internal/provider/stepfun_plan_test.go | 2 +- 9 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 internal/gui/assets/icons/stepfun.svg create mode 100644 internal/provider/stepfun_logo_test.go diff --git a/internal/agent/icons.go b/internal/agent/icons.go index 01a96684a..fa1742adf 100644 --- a/internal/agent/icons.go +++ b/internal/agent/icons.go @@ -24,7 +24,7 @@ var byFamily = []struct{ prefix, icon string }{ {"mistral", "mistral-color"}, {"codestral", "mistral-color"}, {"devstral", "mistral-color"}, {"magistral", "mistral-color"}, {"minimax", "minimax-color"}, {"mimo", "mimocode"}, {"xiaomi", "mimocode"}, - {"step", "stepfun-color"}, + {"step", "stepfun"}, } // providerIcon is the logo of a models.dev provider itself, which for one diff --git a/internal/agent/stepcode.go b/internal/agent/stepcode.go index 7262fa6ba..d97e931fc 100644 --- a/internal/agent/stepcode.go +++ b/internal/agent/stepcode.go @@ -431,7 +431,7 @@ func stepcodeIn(at place) *Agent { a := &Agent{ ID: "stepcode", Name: "StepCode", - Icon: "stepfun-color", + Icon: "stepfun", Bin: "step", Aliases: []string{"step"}, Dir: dir, diff --git a/internal/gui/assets/icons/stepfun-color.svg b/internal/gui/assets/icons/stepfun-color.svg index 920e8a607..acf368a81 100644 --- a/internal/gui/assets/icons/stepfun-color.svg +++ b/internal/gui/assets/icons/stepfun-color.svg @@ -1 +1 @@ -Stepfun \ No newline at end of file +StepFun \ No newline at end of file diff --git a/internal/gui/assets/icons/stepfun.svg b/internal/gui/assets/icons/stepfun.svg new file mode 100644 index 000000000..0d4a25076 --- /dev/null +++ b/internal/gui/assets/icons/stepfun.svg @@ -0,0 +1 @@ +StepFun \ No newline at end of file diff --git a/internal/provider/icon_catalog_list_test.go b/internal/provider/icon_catalog_list_test.go index 7014d66fd..16a45aeab 100644 --- a/internal/provider/icon_catalog_list_test.go +++ b/internal/provider/icon_catalog_list_test.go @@ -6,8 +6,8 @@ import "testing" // (zzstar101 on X: step-5-preview of "stepfun-ai" had none of StepFun's). func TestIconForCatalogFindsAListedCatalog(t *testing.T) { for id, want := range map[string]string{ - "stepfun-ai": "stepfun-color", "stepfun-ai-step-plan": "stepfun-color", - "stepfun": "stepfun-color", "stepfun-step-plan": "stepfun-color", + "stepfun-ai": "stepfun", "stepfun-ai-step-plan": "stepfun", + "stepfun": "stepfun", "stepfun-step-plan": "stepfun", "xiaomi": "mimocode", "xiaomi-token-plan-cn": "mimocode", "openai": "openai", "azure": "azure-color", "": "", } { diff --git a/internal/provider/presets.go b/internal/provider/presets.go index c776fb959..c201247c8 100644 --- a/internal/provider/presets.go +++ b/internal/provider/presets.go @@ -252,14 +252,14 @@ var presets = []PresetDef{ Website: "https://platform.minimaxi.com", KeysURL: "https://platform.minimaxi.com/user-center/basic-information/interface-key"}, // a Step Plan is served at its own endpoints (step_plan/…), its key // refused at the pay-as-you-go ones - {ID: "stepfun", Name: "StepFun", Icon: "stepfun-color", Kind: KindVendor, Catalog: "stepfun-ai-step-plan, stepfun-ai", + {ID: "stepfun", Name: "StepFun", Icon: "stepfun", Kind: KindVendor, Catalog: "stepfun-ai-step-plan, stepfun-ai", Chat: "https://api.stepfun.ai/step_plan/v1", Anthropic: "https://api.stepfun.ai/step_plan", Website: "https://platform.stepfun.ai", KeysURL: "https://platform.stepfun.ai/interface-key", RegionLabel: "Plan", KeyPlans: true, Regions: []Region{ {ID: "plan", Name: "Step Plan", Chat: "https://api.stepfun.ai/step_plan/v1", Anthropic: "https://api.stepfun.ai/step_plan"}, {ID: "api", Name: "Pay as you go", Chat: "https://api.stepfun.ai/v1", Anthropic: "https://api.stepfun.ai"}, }}, - {ID: "stepfun-cn", Name: "StepFun (China)", Icon: "stepfun-color", Kind: KindVendor, Catalog: "stepfun-step-plan, stepfun", + {ID: "stepfun-cn", Name: "StepFun (China)", Icon: "stepfun", Kind: KindVendor, Catalog: "stepfun-step-plan, stepfun", Chat: "https://api.stepfun.com/step_plan/v1", Anthropic: "https://api.stepfun.com/step_plan", Website: "https://platform.stepfun.com", KeysURL: "https://platform.stepfun.com/interface-key", RegionLabel: "Plan", KeyPlans: true, Regions: []Region{ diff --git a/internal/provider/stepfun_accounts_test.go b/internal/provider/stepfun_accounts_test.go index ae94f4c87..ee62a2474 100644 --- a/internal/provider/stepfun_accounts_test.go +++ b/internal/provider/stepfun_accounts_test.go @@ -25,7 +25,7 @@ func stepfunHome(t *testing.T, ps ...Provider) { } func stepfunOn(id, name, site string) Provider { - return Provider{ID: id, Name: name, Icon: "stepfun-color", Chat: "https://api.stepfun." + site + "/step_plan/v1"} + return Provider{ID: id, Name: name, Icon: "stepfun", Chat: "https://api.stepfun." + site + "/step_plan/v1"} } // stepfunFile is stepfun-auth.json as written. diff --git a/internal/provider/stepfun_logo_test.go b/internal/provider/stepfun_logo_test.go new file mode 100644 index 000000000..e00ac9926 --- /dev/null +++ b/internal/provider/stepfun_logo_test.go @@ -0,0 +1,29 @@ +package provider + +import ( + "os" + "strings" + "testing" +) + +// StepFun's mark is the five squares in a circle (stepfun.com's favicon, +// its Hugging Face avatar, lobe-icons' StepFun). The old stepped-S with a +// blue gradient must not come back under either file name a provider can +// still carry (zzstar101 on X). +func TestStepFunLogoIsTheCurrentMark(t *testing.T) { + for _, name := range []string{"stepfun.svg", "stepfun-color.svg"} { + b, err := os.ReadFile("../gui/assets/icons/" + name) + if err != nil { + t.Fatal(err) + } + s := string(b) + if !strings.Contains(s, "M12 0C5.372 0 0 5.372 0 12") || strings.Contains(s, "linearGradient") { + t.Errorf("%s is not StepFun's current mark", name) + } + } + for _, p := range Presets() { + if strings.HasPrefix(p.ID, "stepfun") && p.Icon != "stepfun" { + t.Errorf("preset %s icon = %q", p.ID, p.Icon) + } + } +} diff --git a/internal/provider/stepfun_plan_test.go b/internal/provider/stepfun_plan_test.go index f177362bf..387cb48c0 100644 --- a/internal/provider/stepfun_plan_test.go +++ b/internal/provider/stepfun_plan_test.go @@ -154,7 +154,7 @@ func TestStepFunSession(t *testing.T) { if fi, err := os.Stat(stepfunPath()); err != nil || runtime.GOOS != "windows" && fi.Mode().Perm() != 0o600 { t.Fatalf("session file: %v %v", fi, err) } - p := Provider{ID: "stepfun", Name: "StepFun", Icon: "stepfun-color", Chat: "https://api.stepfun.ai/step_plan/v1"} + p := Provider{ID: "stepfun", Name: "StepFun", Icon: "stepfun", Chat: "https://api.stepfun.ai/step_plan/v1"} q := stepPlanQuota(ctx, p) if q.Error != "" || q.Plan != "Plus" || len(q.Windows) != 3 || q.Renew != "auto" || q.Until == nil || q.Until.Unix() != 1793000000 { t.Fatalf("card: %+v", q)