Skip to content

feat: support reading markdown#29

Open
sharanyavinod wants to merge 5 commits into
mainfrom
ew-md
Open

feat: support reading markdown#29
sharanyavinod wants to merge 5 commits into
mainfrom
ew-md

Conversation

@sharanyavinod
Copy link
Copy Markdown
Collaborator

When a user attaches a .md / text/markdown file with dataBase64, the agent now decodes and inlines the content directly into the system prompt rather than treating it as an opaque upload. The model can read the file immediately; content_upload is still suggested but only needed if the file should be persisted to DA. All other file types remain upload-only. Docs updated accordingly.

Comment thread src/server.ts Outdated
Comment thread src/server.ts Outdated
Comment thread src/server.ts Outdated
Comment thread src/server.ts Outdated
Comment thread src/server.ts Outdated
@anfibiacreativa
Copy link
Copy Markdown
Member

@sharanyavinod you will need to update this PR to target the modularized agent that already landed, if applicable.

Comment thread src/message-pipeline.ts
return item.mediaType === 'text/markdown' || item.fileName.toLowerCase().endsWith('.md');
}

const MAX_INLINE_BYTES = 50_000;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am curious why 50KB? i may have missed this before. Should we have the option to bump it via config? wdyt @mhaack

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.

No reason, kept a dummy threshold we can increase or throw out if needed and this seemed a reasonable starting point.

Comment thread src/message-pipeline.ts
Comment thread src/message-pipeline.ts Outdated
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.

2 participants