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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Stepfun</title><path d="M22.012 0h1.032v.927H24v.968h-.956V3.78h-1.032V1.896h-1.878v-.97h1.878V0zM2.6 12.371V1.87h.969v10.502h-.97zm10.423.66h10.95v.918h-6.208v9.579h-4.742V13.03zM5.629 3.333v12.356H0v4.51h10.386V8L20.859 8l-.003-4.668-15.227.001z" fill="url(#lobe-icons-stepfun-_R_0_)" fill-rule="evenodd"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-stepfun-_R_0_" x1="1.646" x2="18.342" y1="1.916" y2="22.091"><stop stop-color="#01A9FF"></stop><stop offset="1" stop-color="#0160FF"></stop></linearGradient></defs></svg>
|
||||
<svg fill="#000" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>StepFun</title><path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 439 B |
@@ -0,0 +1 @@
|
||||
<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>StepFun</title><path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path></svg>
|
||||
|
After Width: | Height: | Size: 447 B |
@@ -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", "": "",
|
||||
} {
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user