refactor: delete unreferenced Go code (embedding contract, PolicySource, embedded changelog, ignored webui file) and the stale playbooks usage word
This commit is contained in:
23 files changed
-555
No files matched your search
@@ -1,26 +0,0 @@
|
||||
// Package embedding defines the text embedding contract.
|
||||
package embedding
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Sentinel errors every implementation wraps with fmt.Errorf("%w: ...", ...)
|
||||
// so callers can errors.Is regardless of backend.
|
||||
var (
|
||||
// ErrUnavailable means embedding is not configured or cannot run; callers
|
||||
// degrade.
|
||||
ErrUnavailable = errors.New("embedding capability unavailable")
|
||||
// ErrEmptyInput means Embed was called with no texts.
|
||||
ErrEmptyInput = errors.New("embedding request has no input text")
|
||||
)
|
||||
|
||||
// Vector is one embedding: a dense float32 vector.
|
||||
type Vector []float32
|
||||
|
||||
// Client is the narrow typed contract every embedding backend implements.
|
||||
type Client interface {
|
||||
// Embed returns one Vector per text, in order.
|
||||
Embed(ctx context.Context, texts []string) ([]Vector, error)
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
//go:build ignore
|
||||
|
||||
package webui
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIndexHasResponsiveFeatures(t *testing.T) {
|
||||
srv := newTestServer(t)
|
||||
req := httptest.NewRequest("GET", "/", nil)
|
||||
w := httptest.NewRecorder()
|
||||
srv.Handler().ServeHTTP(w, req)
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("status = %d", w.Code)
|
||||
}
|
||||
body := w.Body.String()
|
||||
reqs := []struct {
|
||||
name string
|
||||
want string
|
||||
}{
|
||||
{"mobile-font-padding", "section { min-height: 1.25rem; }"},
|
||||
{"table-wrap", "section .table-wrap { position: relative; overflow-x: auto;"},
|
||||
{"feed-wraps", "white-space: normal"},
|
||||
{"700px-breakpoint", "@media (max-width: 700px)"},
|
||||
}
|
||||
for _, r := range reqs {
|
||||
if !strings.Contains(body, r.want) {
|
||||
t.Errorf("missing responsive feature %q: %q", r.name, r.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user