Skip to content

chore: make vcr tests pretty-print JSON#146

Merged
codefromthecrypt merged 3 commits into
aaif-goose:mainfrom
codefromthecrypt:pretty-vcr
Oct 15, 2024
Merged

chore: make vcr tests pretty-print JSON#146
codefromthecrypt merged 3 commits into
aaif-goose:mainfrom
codefromthecrypt:pretty-vcr

Conversation

@codefromthecrypt
Copy link
Copy Markdown
Collaborator

This makes recordings of HTTP requests and responses more readable at the cost of a little more code.

cc @lamchau @anuraaga as I'm still learning python, so possibly my approach isn't ideal. Changes welcome!

Fixes #127

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Copy link
Copy Markdown

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement

pass


def literal_presenter(dumper, data):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a comment on what this does. IIUC it forces mutliline string

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the feedback, I changed the function name and put some comments on it. hope it is better!

Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
@michaelneale
Copy link
Copy Markdown
Collaborator

looks tidy

@lamchau
Copy link
Copy Markdown
Contributor

lamchau commented Oct 15, 2024

@codefromthecrypt this is so much cleaner! very slick approach

@codefromthecrypt codefromthecrypt merged commit e687b0b into aaif-goose:main Oct 15, 2024
@codefromthecrypt
Copy link
Copy Markdown
Collaborator Author

thanks for the look, folks

@codefromthecrypt codefromthecrypt deleted the pretty-vcr branch October 15, 2024 22:36
ahau-square pushed a commit that referenced this pull request Oct 16, 2024
* origin/main:
  docs: add subheaders to the 'Other ways to run Goose' section (#155)
  fix: Remove tools from exchange when summarizing files (#157)
  chore: use primitives instead of typing imports and fixes completion … (#149)
  chore: make vcr tests pretty-print JSON (#146)
  chore(release): goose 0.9.5 (#159)
  chore(release): exchange 0.9.5 (#158)
lukealvoeiro added a commit that referenced this pull request Oct 17, 2024
* main: (23 commits)
  feat: Run with resume session (#153)
  refactor: move langfuse wrapper to a module in exchange instead of a package (#138)
  docs: add subheaders to the 'Other ways to run Goose' section (#155)
  fix: Remove tools from exchange when summarizing files (#157)
  chore: use primitives instead of typing imports and fixes completion … (#149)
  chore: make vcr tests pretty-print JSON (#146)
  chore(release): goose 0.9.5 (#159)
  chore(release): exchange 0.9.5 (#158)
  chore: updates ollama default model from mistral-nemo to qwen2.5 (#150)
  feat: add vision support for Google (#141)
  fix: session resume with arg handled incorrectly (#145)
  docs: add release instructions to CONTRIBUTING.md (#143)
  docs: add link to action, IDE words (#140)
  docs: goosehints doc fix only (#142)
  chore(release): release 0.9.4 (#136)
  revert: "feat: add local langfuse tracing option  (#106)" (#137)
  feat: add local langfuse tracing option  (#106)
  feat: add groq provider (#134)
  feat: add a deep thinking reasoner model (o1-preview/mini) (#68)
  fix: use concrete SessionNotifier (#135)
  ...
ahau-square pushed a commit that referenced this pull request May 2, 2025
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
Signed-off-by: Adrian Cole <adrian.cole@elastic.co>
jamadeo pushed a commit that referenced this pull request Apr 13, 2026
* feat: add Cmd/Ctrl+N shortcut to open new conversation screen

Adds a keyboard shortcut (Cmd+N on macOS, Ctrl+N on Windows/Linux)
that navigates to the home screen for starting a new conversation.
Cleans up any empty draft session before navigating.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: Cmd/Ctrl+N should open new conversation, not home screen

Use createNewTab() so the shortcut creates a draft chat session
showing the "Start a conversation" empty state, matching the
sidebar's new chat behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use Cmd+N only, matching other shortcuts in the handler

Remove Ctrl+N support to stay consistent with the other keyboard
shortcuts (Cmd+,, Cmd+B, Cmd+W) which only check metaKey.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Investigate formatting multiline values in cassette yaml files

4 participants