Skip to content

fix: schema incorrectly marks optional fields as required#2

Open
huaiyuWangh wants to merge 344 commits intomainfrom
fix/issue-1848-schema-required-fields
Open

fix: schema incorrectly marks optional fields as required#2
huaiyuWangh wants to merge 344 commits intomainfrom
fix/issue-1848-schema-required-fields

Conversation

@huaiyuWangh
Copy link
Owner

Summary

Fixes two schema validation issues that forced users to specify unnecessary fields in their configuration files.

  1. tools.ls incorrectly marked as required

    • Changed Tools.Ls and Config.Tools from omitzero to omitempty
    • The invopop/jsonschema library doesn't recognize Go 1.25's omitzero tag
  2. lsp.command incorrectly marked as required

    • Removed jsonschema:"required" tag from LSPConfig.Command
    • The project's own crush.json doesn't include command field for gopls

After this fix, users can use minimal configurations without being forced to specify tools.ls or lsp.command fields.

Test plan

  • Verified schema generation with task schema
  • Checked that tools and tools.ls are now optional in generated schema
  • Confirmed lsp.command is no longer marked as required

Closes charmbracelet#1848

kujtimiihoxha and others added 30 commits December 17, 2025 16:42
…stant-message

refactor(chat): simple assistant message
…stant-tools

refactor(chat): initial setup for tool calls
charmcli and others added 30 commits January 22, 2026 16:58
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: completions width

* refactor: rename visible items to filtered items (charmbracelet#1957)

the name VisibleItems is misleading because it does not take into
account the height of the list and returns all items that match the
filter.
…acelet#1948)

Ensure we update the textarea after inserting a newline to keep the
cursor position accurate.
…t#1910)

* ci: goreleaser build --snapshot on every commit to main

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* chore: add preconditions

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: faster runners

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: lsp_restart

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* wip

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: typo

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: actually restart

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: simplify

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: render lsp restart

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

* fix: add lsp name to diag

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
… support (charmbracelet#1967)

* fix(ui): prevent AAAA probe bleed in terminals without Kitty graphics support

* refactor(ui): add an OS vendor type for Apple and use DRY for Kitty terminals

* refactor(ui): do not export private symbols, fix a LookupEnv for mocks

* refactor(ui): typo

* refactor(ui): remove dead code

* fix(ui): unify capability querying logic for terminal version and image capabilities

---------

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
…harmbracelet#1947)

* feat(ui): add keybinding to copy chat message content to clipboard

This commit backports the ability to copy the content of chat messages
(assistant, user, and tool messages) to the clipboard using the 'c' key
when the message is focused.

* feat(ui): format tool calls and results for clipboard copying
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
…let#1848)

This fixes two schema validation issues:

1. tools.ls incorrectly marked as required
   - Changed Tools.Ls and Config.Tools from omitzero to omitempty
   - The invopop/jsonschema library doesn't recognize Go 1.25's omitzero tag

2. lsp.command incorrectly marked as required
   - Removed jsonschema:"required" tag from LSPConfig.Command
   - The project's own crush.json doesn't include command field for gopls

After this fix, users can use minimal configurations without being
forced to specify tools.ls or lsp.command fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crush config schema requires "tools.ls"