Conversation
8698dc4 to
ed5f9aa
Compare
…ormat
The previous custom duration format (`"3"` for 3 ms, `"5m"` for 5 ms,
`"1u"` for 1 µs) was non-standard and undiscoverable. This replaces it
with [`humantime`]-compatible strings (`"3ms"`, `"500us"`, `"1s"`,
`"0s"`) across the entire `TypewriterConfig`.
Default values in `#[setting(...)]` annotations are updated accordingly:
`text_delay` from `"3"` → `"3ms"`, `code_delay` from `"500u"` →
`"500us"`, and `max_latency` from `"0"` → `"0s"`.
Custom `Serialize`/`Deserialize` implementations replace the derived
ones so that values round-trip as humantime strings. A backwards-compat
`visit_map` path accepts the old `{secs, nanos}` shape that stored
conversations may still carry, so existing data keeps loading without a
migration.
The `Schematic` impl is now handwritten to expose a descriptive string
type in the generated schema. `Display` and `FromStr` are also
implemented, both delegating to `humantime`.
The default persona config is updated to set `typewriter.max_latency =
"200ms"` using the new format.
BREAKING CHANGE: Typewriter delay format changed
Any `jp` config file that sets `text_delay`, `code_delay`, or
`max_latency` using the old shorthand (`"3"`, `"5m"`, `"1u"`) will fail
to parse. Update those values to humantime strings, e.g.:
text_delay = "3ms"
code_delay = "500us"
max_latency = "200ms"
Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous custom duration format (
"3"for 3 ms,"5m"for 5 ms,"1u"for 1 µs) was non-standard and undiscoverable. This replaces itwith [
humantime]-compatible strings ("3ms","500us","1s","0s") across the entireTypewriterConfig.Default values in
#[setting(...)]annotations are updated accordingly:text_delayfrom"3"→"3ms",code_delayfrom"500u"→"500us", andmax_latencyfrom"0"→"0s".Custom
Serialize/Deserializeimplementations replace the derivedones so that values round-trip as humantime strings. A backwards-compat
visit_mappath accepts the old{secs, nanos}shape that storedconversations may still carry, so existing data keeps loading without a
migration.
The
Schematicimpl is now handwritten to expose a descriptive stringtype in the generated schema.
DisplayandFromStrare alsoimplemented, both delegating to
humantime.The default persona config is updated to set
typewriter.max_latency = "200ms"using the new format.BREAKING CHANGE: Typewriter delay format changed
Any
jpconfig file that setstext_delay,code_delay, ormax_latencyusing the old shorthand ("3","5m","1u") will failto parse. Update those values to humantime strings, e.g.: