docs(vale): reject em dashes, and remove the ones on the tree (#2149)
AGENTS.md forbids em dashes in prose, comments and user-facing strings, and nothing checked it: Google.EmDash only flags a dash with a space on both sides, so a bare U+2014 passed. Archie.EmDash rejects U+2014 for Markdown, templates and Go, with a message naming the alternatives. The 40 occurrences it finds are rewritten as a comma, a colon, brackets or a second sentence, and scratch trees are out of scope so a run over the repository reports on what the repository holds.
This commit is contained in:
20 files changed
+66
-40
No files matched your search
@@ -87,3 +87,22 @@ Archie.UILabelFormat = NO
|
|||||||
# Never lint generated Go files (protobuf, sqlc).
|
# Never lint generated Go files (protobuf, sqlc).
|
||||||
[*.{pb,sql}.go]
|
[*.{pb,sql}.go]
|
||||||
BasedOnStyles =
|
BasedOnStyles =
|
||||||
|
|
||||||
|
# Scratch checkouts, installed skills and generated output are not Archie's
|
||||||
|
# prose: a run over the repository must report on what the repository holds.
|
||||||
|
[tmp/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.local/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.agents/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[archipelago/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[ui/node_modules/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[ui/dist/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.agents-run/**]
|
||||||
|
BasedOnStyles =
|
||||||
|
[.impeccable/**]
|
||||||
|
BasedOnStyles =
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
extends: existence
|
||||||
|
message: "No em dashes. Use a comma, brackets, a colon, or a second sentence."
|
||||||
|
level: error
|
||||||
|
nonword: true
|
||||||
|
scope: raw
|
||||||
|
tokens:
|
||||||
|
- '\u2014'
|
||||||
+1
-1
@@ -185,7 +185,7 @@ _needs a repository._
|
|||||||
_needs a repository._
|
_needs a repository._
|
||||||
|
|
||||||
No settings. It runs the repository policy's `tooling` commands, in order, in
|
No settings. It runs the repository policy's `tooling` commands, in order, in
|
||||||
the task worktree — the installs a gate needs and the container does not ship
|
the task worktree: the installs a gate needs and the container does not ship
|
||||||
(protoc plugins, linters, generators). A repository that declares none installs
|
(protoc plugins, linters, generators). A repository that declares none installs
|
||||||
nothing and the step succeeds. Place it after `repo.prepare` and before any
|
nothing and the step succeeds. Place it after `repo.prepare` and before any
|
||||||
`gate.*` step. A failing install fails the step with the command and its output,
|
`gate.*` step. A failing install fails the step with the command and its output,
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ login -- see
|
|||||||
|
|
||||||
1. Pick a starting configuration. The full set of annotated templates lives
|
1. Pick a starting configuration. The full set of annotated templates lives
|
||||||
in this repository's `deployments/` directory on GitHub
|
in this repository's `deployments/` directory on GitHub
|
||||||
(<https://offloaded.dev>) —
|
(<https://offloaded.dev>):
|
||||||
`standalone.toml` (no forge, the simplest start),
|
`standalone.toml` (no forge, the simplest start),
|
||||||
`single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs
|
`single-forge-github.toml` and `docker-nats-stack.toml` cover the common cases. Every one needs
|
||||||
PostgreSQL 18 with the `archie_migrator` and `archie_runtime` roles created
|
PostgreSQL 18 with the `archie_migrator` and `archie_runtime` roles created
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ Archie Core uses the GitHub API to:
|
|||||||
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for
|
4. Choose an **Expiration** (e.g. 90 days, 1 year, or No expiration for
|
||||||
dedicated bot accounts).
|
dedicated bot accounts).
|
||||||
5. Select the required scope:
|
5. Select the required scope:
|
||||||
- **`repo`** (Full control of private repositories — required for polling,
|
- **`repo`** (Full control of private repositories: required for polling,
|
||||||
commenting, pushing branches, and opening PRs).
|
commenting, pushing branches, and opening PRs).
|
||||||
- **`workflow`** (Optional — required if Archie needs to update GitHub
|
- **`workflow`** (Optional, required if Archie needs to update GitHub
|
||||||
Actions workflows).
|
Actions workflows).
|
||||||
6. Scroll to the bottom and select **Generate token**.
|
6. Scroll to the bottom and select **Generate token**.
|
||||||
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to
|
7. **Copy your token immediately** (starts with `ghp_...`). You won't be able to
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ type ToolSetOptions struct {
|
|||||||
ExcludeToolsets []string
|
ExcludeToolsets []string
|
||||||
|
|
||||||
// Approval is the operator-consent gate for tools marked RequiresApproval.
|
// Approval is the operator-consent gate for tools marked RequiresApproval.
|
||||||
// Nil means no approver is configured — such tools are omitted from the
|
// Nil means no approver is configured, so such tools are omitted from the
|
||||||
// built set rather than failing at call time.
|
// built set rather than failing at call time.
|
||||||
Approval tools.ApprovalRequester
|
Approval tools.ApprovalRequester
|
||||||
|
|
||||||
|
|||||||
@@ -753,16 +753,16 @@ func selfNetwork(ctx context.Context, cli *client.Client, log *slog.Logger) stri
|
|||||||
}
|
}
|
||||||
hostname, err := os.Hostname()
|
hostname, err := os.Hostname()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WarnContext(ctx, "container network auto-detect: os.Hostname failed, spawned containers will use the default bridge network and won't resolve sibling services by name — set containers.network explicitly", "err", err)
|
log.WarnContext(ctx, "container network auto-detect: os.Hostname failed, spawned containers will use the default bridge network and won't resolve sibling services by name. Set containers.network explicitly", "err", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
self, err := cli.ContainerInspect(ctx, hostname, client.ContainerInspectOptions{})
|
self, err := cli.ContainerInspect(ctx, hostname, client.ContainerInspectOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.WarnContext(ctx, "container network auto-detect: could not inspect self by hostname, spawned containers will use the default bridge network and won't resolve sibling services by name — set containers.network explicitly", "hostname", hostname, "err", err)
|
log.WarnContext(ctx, "container network auto-detect: could not inspect self by hostname, spawned containers will use the default bridge network and won't resolve sibling services by name. Set containers.network explicitly", "hostname", hostname, "err", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if self.Container.NetworkSettings == nil {
|
if self.Container.NetworkSettings == nil {
|
||||||
log.WarnContext(ctx, "container network auto-detect: self container has no NetworkSettings, spawned containers will use the default bridge network — set containers.network explicitly", "hostname", hostname)
|
log.WarnContext(ctx, "container network auto-detect: self container has no NetworkSettings, spawned containers will use the default bridge network. Set containers.network explicitly", "hostname", hostname)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
for name := range self.Container.NetworkSettings.Networks {
|
for name := range self.Container.NetworkSettings.Networks {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
// The audit retention policy: which runtime event kinds the sweep may delete,
|
// The audit retention policy: which runtime event kinds the sweep may delete,
|
||||||
// and which it must keep no matter what an instance setting says. The lists are
|
// and which it must keep no matter what an instance setting says. The lists are
|
||||||
// code, not settings — a stored document chooses a window for a prunable kind
|
// code, not settings: a stored document chooses a window for a prunable kind
|
||||||
// but can never widen this boundary, and a security record is never deleted.
|
// but can never widen this boundary, and a security record is never deleted.
|
||||||
|
|
||||||
// observabilityEventKinds is the high-volume observability trail the sweep may
|
// observabilityEventKinds is the high-volume observability trail the sweep may
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ type Manifest struct {
|
|||||||
// state read at pass time.
|
// state read at pass time.
|
||||||
OnInput bool
|
OnInput bool
|
||||||
// Tools is the declared tool set: the only tools a pass may reach.
|
// Tools is the declared tool set: the only tools a pass may reach.
|
||||||
// Enforcement is mechanical — the pass's tool set is built from this
|
// Enforcement is mechanical: the pass's tool set is built from this
|
||||||
// list, never from a broader registry.
|
// list, never from a broader registry.
|
||||||
Tools []string
|
Tools []string
|
||||||
// Skills declares the skill-maintenance capability. The registrar must
|
// Skills declares the skill-maintenance capability. The registrar must
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ func (r *Registry) Host() Registrar {
|
|||||||
|
|
||||||
// validateDeclared enforces "only the host services a curator's declared
|
// validateDeclared enforces "only the host services a curator's declared
|
||||||
// shape requires": a declared capability must have a host service behind it.
|
// shape requires": a declared capability must have a host service behind it.
|
||||||
// A curator can never discover the daemon or an untyped hook map here — the
|
// A curator can never discover the daemon or an untyped hook map here: the
|
||||||
// registrar is the only channel.
|
// registrar is the only channel.
|
||||||
func (r *Registry) validateDeclared(m Manifest) error {
|
func (r *Registry) validateDeclared(m Manifest) error {
|
||||||
if len(m.Tools) > 0 && r.host.Tools == nil {
|
if len(m.Tools) > 0 && r.host.Tools == nil {
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ func waitLoops(ctx context.Context, loops ...*loop) error {
|
|||||||
|
|
||||||
// Nudge is a best-effort wake: input-driven curators check their trigger
|
// Nudge is a best-effort wake: input-driven curators check their trigger
|
||||||
// early instead of waiting for the next interval. A full channel or an
|
// early instead of waiting for the next interval. A full channel or an
|
||||||
// unknown name drops the nudge — waking is an acceleration, never the
|
// unknown name drops the nudge: waking is an acceleration, never the
|
||||||
// source of truth. An empty curator name nudges every input-driven curator.
|
// source of truth. An empty curator name nudges every input-driven curator.
|
||||||
func (rt *Runtime) Nudge(curator string) {
|
func (rt *Runtime) Nudge(curator string) {
|
||||||
rt.mu.Lock()
|
rt.mu.Lock()
|
||||||
@@ -317,8 +317,8 @@ func (rt *Runtime) runLoop(ctx context.Context, name string, c CuratorEngine, wa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// waitNext blocks until a nudge, the sleep timer, or shutdown. woke means
|
// waitNext blocks until a nudge, the sleep timer, or shutdown. woke means
|
||||||
// a nudge fired — re-check the trigger now; done means the context was
|
// a nudge fired: re-check the trigger now; done means the context was
|
||||||
// cancelled — exit the loop.
|
// cancelled, so exit the loop.
|
||||||
func waitNext(ctx context.Context, wakeCh <-chan struct{}, timer <-chan time.Time) (woke, done bool) {
|
func waitNext(ctx context.Context, wakeCh <-chan struct{}, timer <-chan time.Time) (woke, done bool) {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ type Scope struct {
|
|||||||
Org org.OrgID
|
Org org.OrgID
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate rejects an unknown kind, a missing component, and — just as
|
// Validate rejects an unknown kind, a missing component, and (just as
|
||||||
// importantly — a component present where it is not required, so no two
|
// importantly) a component present where it is not required, so no two
|
||||||
// spellings address the same region.
|
// spellings address the same region.
|
||||||
func (s Scope) Validate() error {
|
func (s Scope) Validate() error {
|
||||||
switch s.Kind {
|
switch s.Kind {
|
||||||
@@ -159,7 +159,7 @@ type Subject struct {
|
|||||||
// AgentID simply yields no agent-addressed scopes.
|
// AgentID simply yields no agent-addressed scopes.
|
||||||
AgentID AgentID
|
AgentID AgentID
|
||||||
// UserID is the initiating user's identity. Empty when the channel
|
// UserID is the initiating user's identity. Empty when the channel
|
||||||
// carries no per-person identity (the dashboard, a webhook) — which
|
// carries no per-person identity (the dashboard, a webhook), which
|
||||||
// means "show none of it", never "fall back to a wider scope".
|
// means "show none of it", never "fall back to a wider scope".
|
||||||
UserID IdentityID
|
UserID IdentityID
|
||||||
// Org is the org the turn runs in; every scope it reads or writes
|
// Org is the org the turn runs in; every scope it reads or writes
|
||||||
@@ -173,7 +173,7 @@ func (s Subject) Scopes() []Scope {
|
|||||||
return append(s.WritableScopes(), Scope{Kind: ScopeGlobal, Org: s.Org})
|
return append(s.WritableScopes(), Scope{Kind: ScopeGlobal, Org: s.Org})
|
||||||
}
|
}
|
||||||
|
|
||||||
// WritableScopes returns the scopes a write for this subject may name —
|
// WritableScopes returns the scopes a write for this subject may name,
|
||||||
// Scopes() minus global, which is never model-writable. A component the
|
// Scopes() minus global, which is never model-writable. A component the
|
||||||
// subject does not carry removes every scope that requires it.
|
// subject does not carry removes every scope that requires it.
|
||||||
func (s Subject) WritableScopes() []Scope {
|
func (s Subject) WritableScopes() []Scope {
|
||||||
@@ -250,7 +250,7 @@ type NewRecord struct {
|
|||||||
Scope Scope
|
Scope Scope
|
||||||
Kind string
|
Kind string
|
||||||
Content string
|
Content string
|
||||||
// Author is the acting identity that wrote the record — an agent id, or
|
// Author is the acting identity that wrote the record: an agent id, or
|
||||||
// a producer's own name ("operator", "session-memory curator"). Free
|
// a producer's own name ("operator", "session-memory curator"). Free
|
||||||
// text: the engine retains it, it does not interpret it.
|
// text: the engine retains it, it does not interpret it.
|
||||||
Author string
|
Author string
|
||||||
@@ -286,7 +286,7 @@ type Query struct {
|
|||||||
// the prompt path; ranked retrieval is a deliberately open question.
|
// the prompt path; ranked retrieval is a deliberately open question.
|
||||||
Text string
|
Text string
|
||||||
// Limit bounds the number of records returned. Zero lets the engine
|
// Limit bounds the number of records returned. Zero lets the engine
|
||||||
// choose a default; there is no way to request "unlimited" — List
|
// choose a default; there is no way to request "unlimited". List
|
||||||
// exists for that.
|
// exists for that.
|
||||||
Limit int
|
Limit int
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Registrar is the narrow typed host access an engine receives at
|
// Registrar is the narrow typed host access an engine receives at
|
||||||
// registration. Fields are typed contracts declared here — this package
|
// registration. Fields are typed contracts declared here: this package
|
||||||
// never names who implements them, and the daemon itself is never part of
|
// never names who implements them, and the daemon itself is never part of
|
||||||
// it.
|
// it.
|
||||||
type Registrar struct {
|
type Registrar struct {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ func Origin(platform string, c ConversationID) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MessageID is the canonical, immutable identifier for a Message. Once
|
// MessageID is the canonical, immutable identifier for a Message. Once
|
||||||
// assigned it never changes, including across branch and fork operations —
|
// assigned it never changes, including across branch and fork operations,
|
||||||
// a forked transcript references the original MessageID it branched from
|
// a forked transcript references the original MessageID it branched from
|
||||||
// rather than minting a new one for shared history.
|
// rather than minting a new one for shared history.
|
||||||
type MessageID string
|
type MessageID string
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ func (c *SettingsCommand) list(ctx context.Context, args []string) string {
|
|||||||
sort.Slice(descriptors, func(i, j int) bool { return descriptors[i].Kind < descriptors[j].Kind })
|
sort.Slice(descriptors, func(i, j int) bool { return descriptors[i].Kind < descriptors[j].Kind })
|
||||||
lines := []string{"Settings:"}
|
lines := []string{"Settings:"}
|
||||||
for _, descriptor := range descriptors {
|
for _, descriptor := range descriptors {
|
||||||
lines = append(lines, fmt.Sprintf("- %s — %s", descriptor.Kind, descriptor.Title))
|
lines = append(lines, fmt.Sprintf("- %s: %s", descriptor.Kind, descriptor.Title))
|
||||||
}
|
}
|
||||||
return strings.Join(lines, "\n")
|
return strings.Join(lines, "\n")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ func (systemClock) Now() time.Time { return time.Now() }
|
|||||||
func (systemClock) After(d time.Duration) <-chan time.Time { return time.After(d) }
|
func (systemClock) After(d time.Duration) <-chan time.Time { return time.After(d) }
|
||||||
|
|
||||||
// Sink is the narrow event contract the engine needs. It matches
|
// Sink is the narrow event contract the engine needs. It matches
|
||||||
// events.Bus's emitter shape without importing it — the domain declares what
|
// events.Bus's emitter shape without importing it: the domain declares what
|
||||||
// it needs and app wires the implementation in.
|
// it needs and app wires the implementation in.
|
||||||
type Sink interface {
|
type Sink interface {
|
||||||
Emit(kind, detail string, data map[string]any)
|
Emit(kind, detail string, data map[string]any)
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ type StepType struct {
|
|||||||
|
|
||||||
// StepTypeProvider is the typed extension point through which a plugin
|
// StepTypeProvider is the typed extension point through which a plugin
|
||||||
// contributes workflow step types. StepTypes is the capability-specific
|
// contributes workflow step types. StepTypes is the capability-specific
|
||||||
// operation — a provider exposing identity metadata alone would be a metadata
|
// operation: a provider exposing identity metadata alone would be a metadata
|
||||||
// entry, not a step-type provider — and it is the only method the family calls.
|
// entry, not a step-type provider, and it is the only method the family calls.
|
||||||
type StepTypeProvider interface {
|
type StepTypeProvider interface {
|
||||||
// Name identifies the provider in registration diagnostics.
|
// Name identifies the provider in registration diagnostics.
|
||||||
Name() string
|
Name() string
|
||||||
|
|||||||
@@ -1068,7 +1068,7 @@ func (r *Router) handleAgents(ctx context.Context) (string, error) {
|
|||||||
var b strings.Builder
|
var b strings.Builder
|
||||||
b.WriteString("Active agents:\n")
|
b.WriteString("Active agents:\n")
|
||||||
for _, a := range agents {
|
for _, a := range agents {
|
||||||
fmt.Fprintf(&b, " #%d %s — %s (%s)\n", a.ID, listingTitle(a.Title), a.Status, a.Identity)
|
fmt.Fprintf(&b, " #%d %s: %s (%s)\n", a.ID, listingTitle(a.Title), a.Status, a.Identity)
|
||||||
}
|
}
|
||||||
return strings.TrimSpace(b.String()), nil
|
return strings.TrimSpace(b.String()), nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,9 +321,9 @@ func (r *Router) handleTopic(ctx context.Context, msg messaging.Message, platfor
|
|||||||
|
|
||||||
func topicHelpText() string {
|
func topicHelpText() string {
|
||||||
return "Usage: /topic [off|help|<session-id>]\n" +
|
return "Usage: /topic [off|help|<session-id>]\n" +
|
||||||
" off — disable topic routing\n" +
|
" off disable topic routing\n" +
|
||||||
" help — show this help\n" +
|
" help show this help\n" +
|
||||||
" <session-id> — switch to a session by the ID shown in /topic"
|
" <session-id> switch to a session by the ID shown in /topic"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Router) topicListSessions(ctx context.Context, msg messaging.Message, platform string) (string, error) {
|
func (r *Router) topicListSessions(ctx context.Context, msg messaging.Message, platform string) (string, error) {
|
||||||
@@ -340,7 +340,7 @@ func (r *Router) topicListSessions(ctx context.Context, msg messaging.Message, p
|
|||||||
if s.SessionID == active {
|
if s.SessionID == active {
|
||||||
marker = "*"
|
marker = "*"
|
||||||
}
|
}
|
||||||
fmt.Fprintf(&b, " %s %s — %s", marker, shortSessionID(s.SessionID), sessionDisplayTitle(s))
|
fmt.Fprintf(&b, " %s %s: %s", marker, shortSessionID(s.SessionID), sessionDisplayTitle(s))
|
||||||
if s.BranchName != "" {
|
if s.BranchName != "" {
|
||||||
fmt.Fprintf(&b, " [branch: %s]", s.BranchName)
|
fmt.Fprintf(&b, " [branch: %s]", s.BranchName)
|
||||||
}
|
}
|
||||||
@@ -384,7 +384,7 @@ func (r *Router) handleRetry(ctx context.Context, msg messaging.Message) (string
|
|||||||
return "", fmt.Errorf("retry: %w", err)
|
return "", fmt.Errorf("retry: %w", err)
|
||||||
}
|
}
|
||||||
if deleted == 0 {
|
if deleted == 0 {
|
||||||
return "Nothing to retry — no messages in this session.", nil
|
return "Nothing to retry: no messages in this session.", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the last user message and replay it.
|
// Retrieve the last user message and replay it.
|
||||||
@@ -393,7 +393,7 @@ func (r *Router) handleRetry(ctx context.Context, msg messaging.Message) (string
|
|||||||
return "", fmt.Errorf("retry load messages: %w", err)
|
return "", fmt.Errorf("retry load messages: %w", err)
|
||||||
}
|
}
|
||||||
if len(msgs) == 0 {
|
if len(msgs) == 0 {
|
||||||
return "Nothing to retry — no messages remain.", nil
|
return "Nothing to retry: no messages remain.", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if r.LLM == nil {
|
if r.LLM == nil {
|
||||||
@@ -425,7 +425,7 @@ func (r *Router) handleUndo(ctx context.Context, msg messaging.Message, rest str
|
|||||||
if rest != "" {
|
if rest != "" {
|
||||||
parsed, ok := parsePositiveInt(strings.TrimSpace(rest))
|
parsed, ok := parsePositiveInt(strings.TrimSpace(rest))
|
||||||
if !ok {
|
if !ok {
|
||||||
return "Usage: /undo [N] — N must be a positive number (default: 1)", nil
|
return "Usage: /undo [N], where N must be a positive number (default: 1)", nil
|
||||||
}
|
}
|
||||||
n = parsed
|
n = parsed
|
||||||
}
|
}
|
||||||
@@ -436,7 +436,7 @@ func (r *Router) handleUndo(ctx context.Context, msg messaging.Message, rest str
|
|||||||
}
|
}
|
||||||
|
|
||||||
if deleted == 0 {
|
if deleted == 0 {
|
||||||
return "Nothing to undo — no messages in this session.", nil
|
return "Nothing to undo: no messages in this session.", nil
|
||||||
}
|
}
|
||||||
if deleted == 1 {
|
if deleted == 1 {
|
||||||
return "Removed 1 message.", nil
|
return "Removed 1 message.", nil
|
||||||
@@ -587,11 +587,11 @@ func (r *Router) handleCompress(ctx context.Context, msg messaging.Message, rest
|
|||||||
|
|
||||||
case "here":
|
case "here":
|
||||||
if len(fields) < 2 {
|
if len(fields) < 2 {
|
||||||
return "Usage: /compress here <N> — keep the last N messages", nil
|
return "Usage: /compress here <N>, keeping the last N messages", nil
|
||||||
}
|
}
|
||||||
n, ok := parsePositiveInt(fields[1])
|
n, ok := parsePositiveInt(fields[1])
|
||||||
if !ok {
|
if !ok {
|
||||||
return "Usage: /compress here <N> — N must be a positive number", nil
|
return "Usage: /compress here <N>, where N must be a positive number", nil
|
||||||
}
|
}
|
||||||
cfg.ProtectLast = n
|
cfg.ProtectLast = n
|
||||||
return r.applyCompress(ctx, sessionID, cfg)
|
return r.applyCompress(ctx, sessionID, cfg)
|
||||||
@@ -604,7 +604,7 @@ func (r *Router) handleCompress(ctx context.Context, msg messaging.Message, rest
|
|||||||
// field for it, so this used to discard the topic and silently run a
|
// field for it, so this used to discard the topic and silently run a
|
||||||
// full default compression instead. Rewriting history is not
|
// full default compression instead. Rewriting history is not
|
||||||
// something to do as a side effect of an unimplemented option.
|
// something to do as a side effect of an unimplemented option.
|
||||||
return "Focused compression is not supported yet — /compress summarises " +
|
return "Focused compression is not supported yet: /compress summarises " +
|
||||||
"the whole history. Use /compress here <N> to keep the last N messages.", nil
|
"the whole history. Use /compress here <N> to keep the last N messages.", nil
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func (r *Router) handleDelete(ctx context.Context, msg messaging.Message, rest s
|
|||||||
// No bare form. Deleting "the current conversation" on an
|
// No bare form. Deleting "the current conversation" on an
|
||||||
// unqualified command is one keystroke away from destroying a
|
// unqualified command is one keystroke away from destroying a
|
||||||
// history nobody meant to touch; the session must be named.
|
// history nobody meant to touch; the session must be named.
|
||||||
return "Usage: /delete <session-id> — permanently removes a conversation and its history. Run /sessions to see the ids.", nil
|
return "Usage: /delete <session-id>, which permanently removes a conversation and its history. Run /sessions to see the ids.", nil
|
||||||
}
|
}
|
||||||
if r.Sessions == nil {
|
if r.Sessions == nil {
|
||||||
return "Session management is not configured.", nil
|
return "Session management is not configured.", nil
|
||||||
@@ -37,7 +37,7 @@ func (r *Router) handleDelete(ctx context.Context, msg messaging.Message, rest s
|
|||||||
return fmt.Sprintf("No session matching %q.", ref), nil
|
return fmt.Sprintf("No session matching %q.", ref), nil
|
||||||
case target.SessionID != ref && len([]rune(ref)) < minDeleteRefLen:
|
case target.SessionID != ref && len([]rune(ref)) < minDeleteRefLen:
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"Refusing to delete on %d characters — this cannot be undone. "+
|
"Refusing to delete on %d characters: this cannot be undone. "+
|
||||||
"Give at least %d characters of the session id, or its full id.",
|
"Give at least %d characters of the session id, or its full id.",
|
||||||
len([]rune(ref)), minDeleteRefLen,
|
len([]rune(ref)), minDeleteRefLen,
|
||||||
), nil
|
), nil
|
||||||
|
|||||||
Reference in new issue
Block a user