Skip to content

Conversation

@dbraduan
Copy link
Contributor

@dbraduan dbraduan commented May 14, 2025

Title.

We need this code, so that we can have a clean way of parsing a session into a human-readable text format, otherwise we have to write our own parser of .jsonl without benefits of the types in the codebase.

Use case: we want to build internal sharing tool, and for that we would ideally have a clean format to export sessions.

Copy link

@hasnain-db hasnain-db left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

Perhaps the PR description can also explain the use case we're looking to enable, so it can be reviewed with that in mind?

I do think this needs some tests so we can see what the output looks like and check for any regressions.

@dbraduan dbraduan requested a review from hasnain-db May 24, 2025 22:45
@dbraduan
Copy link
Contributor Author

@hasnain-db addressed your comments, LMK your thoughts.

@dbraduan dbraduan changed the title Add export command to CLI for markdown export of sessions cli(command): Add export command to CLI for markdown export of sessions May 24, 2025
use serde_json::Value;

const MAX_STRING_LENGTH_MD_EXPORT: usize = 4096; // Generous limit for export
const REDACTED_PREFIX_LENGTH: usize = 100; // Show first 100 chars before trimming

Choose a reason for hiding this comment

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

nit - should we say TRIMMED (here and below)

@dbraduan
Copy link
Contributor Author

dbraduan commented Jun 3, 2025

Should be good to go, @angiejones ?

@dbraduan
Copy link
Contributor Author

dbraduan commented Jun 4, 2025

should be good now, @angiejones

@angiejones angiejones merged commit d3359a1 into block:main Jun 4, 2025
6 checks passed
michaelneale added a commit that referenced this pull request Jun 5, 2025
* main: (82 commits)
  feat: lead/worker model (#2719)
  fix: pass ref in pr comment workflow (#2777)
  feat: goose web for local terminal alternative (#2718)
  chore: run CI on merge_group (#2786)
  fix: Don't break from consuming subprocess output in shell tool until both streams are done (#2771)
  Add retries w/ exponential backoff for databricks provider (#2764)
  Fix paths in google drive mcp documentation (#2775)
  testing windows build (#2770)
  docs: Add Context7 YouTube Video (#2779)
  cli(command): Add `export` command to CLI for markdown export of sessions (#2533)
  fix(copilot): gh copilot auth token conflicts w/ gh mcp env var (#2743)
  feat(providers): Add support for Gemini 2.5 Flash Preview and Pro Preview models (#2780)
  fix: pr comment build cli workflow (#2774)
  hotfix: don't always run prompt (#2773)
  Lifei/test workflow (#2772)
  chore: use hermit to install node, rust and protoc (#2766)
  Feat: Refined the documentation for Goose (#2751)
  mcp(developer): add fallback on .gitignore if no .gooseignore is present (#2661)
  cli(ux): Show active context length in CLI (#2315)
  cli(config): Add GOOSE_CONTEXT_STRATEGY setting (#2666)
  ...
lifeizhou-ap added a commit that referenced this pull request Jun 5, 2025
* main:
  feat: lead/worker model (#2719)
  fix: pass ref in pr comment workflow (#2777)
  feat: goose web for local terminal alternative (#2718)
  chore: run CI on merge_group (#2786)
  fix: Don't break from consuming subprocess output in shell tool until both streams are done (#2771)
  Add retries w/ exponential backoff for databricks provider (#2764)
  Fix paths in google drive mcp documentation (#2775)
  testing windows build (#2770)
  docs: Add Context7 YouTube Video (#2779)
  cli(command): Add `export` command to CLI for markdown export of sessions (#2533)
  fix(copilot): gh copilot auth token conflicts w/ gh mcp env var (#2743)
  feat(providers): Add support for Gemini 2.5 Flash Preview and Pro Preview models (#2780)
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

4 participants