-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(files): inline rich markdown editor #5133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
9ecb00e
feat(files): inline rich markdown editor
waleedlatif1 89eadf0
fix(files): chain autosave unmount flush after in-flight save
waleedlatif1 ae9e331
fix(files): read pasted images from clipboard items, not just files
waleedlatif1 959a560
fix(files): destroy round-trip probe editor on serialization error
waleedlatif1 5df2666
fix(resource): hold breadcrumb nav latch across the route swap
waleedlatif1 4022c9e
chore(files): drop platform references and non-essential inline comments
waleedlatif1 24641a3
fix(files): scope inline markdown editor to the files view
waleedlatif1 0776152
fix(mothership): use the inline markdown editor in the chat resource …
waleedlatif1 312b5ee
refactor(files): collapse the duplicate raw-editor fallback branch in…
waleedlatif1 59eedeb
fix(mothership): swap to the inline editor once a file preview finish…
waleedlatif1 dc48ea8
Revert "fix(mothership): swap to the inline editor once a file previe…
waleedlatif1 ce582c0
Revert "fix(mothership): use the inline markdown editor in the chat r…
waleedlatif1 f0bd78b
feat(files): rich markdown editor across files + chat, read-only for …
waleedlatif1 511fc6b
chore(files): remove dead code (unused FileViewer logger + EmbeddedWo…
waleedlatif1 462cd81
fix(files): derive markdown round-trip verdict from live content, not…
waleedlatif1 c308124
test(files): guard the rich editor dirty signal — open is never dirty…
waleedlatif1 f844a6a
fix(files): lock the markdown round-trip verdict on opened content, n…
waleedlatif1 89a269e
improvement(file-viewer): reuse shared copy hook, lazy frontmatter split
waleedlatif1 b7d87c8
feat(file-viewer): linked images, typed-link input rule, drag-to-reor…
waleedlatif1 55860f6
improvement(file-viewer): Backspace at start of a heading reverts it …
waleedlatif1 f86f400
fix(file-viewer): don't upload pasted/dropped images into a read-only…
waleedlatif1 f8ac591
fix(file-viewer): sanitize linked-image href; drop global leading-new…
waleedlatif1 1d0fee9
feat(file-viewer): stream agent output directly into the rich editor;…
waleedlatif1 0eb6ce2
fix(sidebar): hydrate collapse state before paint to stop refresh flash
waleedlatif1 6439396
refactor(file-viewer): audit fixes — stale docs, DRY settle-lock, lan…
waleedlatif1 63a4f67
refactor(file-viewer): remove dead markdown-preview renderer now supe…
waleedlatif1 49868aa
refactor(file-viewer): drop dead streamingMode/append path, align nam…
waleedlatif1 6e8bd21
fix(file-viewer): re-lock round-trip verdict + frontmatter on each st…
waleedlatif1 249be95
test(file-viewer): lock link href sanitization for dangerous schemes …
waleedlatif1 95416f3
perf(file-viewer): cap the round-trip probe at 24KB and coalesce stre…
waleedlatif1 e2c7f1e
perf(file-viewer): chunked markdown parsing to remove the O(n2) mount…
waleedlatif1 2eaf3aa
fix(sidebar): render collapse state from a cookie so SSR matches
waleedlatif1 f8fa284
refactor(sidebar): make the cookie the single source of truth for col…
waleedlatif1 443b8e4
refactor(file-viewer): simplify + cleanup chunked-parse (linear merge…
waleedlatif1 d8966b6
refactor(sidebar): drop orphaned sidebar-collapse-btn class
waleedlatif1 535798b
test(file-viewer): consolidate split test files into one per module
waleedlatif1 fc2dd87
fix(file-viewer): make all editor controls respect read-only permissions
waleedlatif1 691d228
fix(sidebar): honor collapsed cookie even when localStorage is corrupt
waleedlatif1 ebf4986
docs(sidebar): convert inline comments to TSDoc
waleedlatif1 8c0b5bb
fix(file-viewer): resolve in-app workspace image URLs in the rich editor
waleedlatif1 77fc0f3
fix(files): restore same-page anchor links in the rich markdown editor
waleedlatif1 34fad14
feat(files): render mermaid diagrams in the rich markdown editor
waleedlatif1 be81caf
fix(files): harden the markdown editor (CRLF chunking, href allowlist…
waleedlatif1 10dcd94
test(files): cover the code-highlight incremental re-tokenization gate
waleedlatif1 26f9fc5
fix(files): keep relative links relative, navigate in-app links withi…
waleedlatif1 dd3fe50
fix(files): linked images don't open a tab on a plain click in the ed…
waleedlatif1 af66d9f
fix(sidebar): match the collapse cookie value strictly (not a substring)
waleedlatif1 cc2d84c
fix(sidebar): reconcile migrated-legacy collapse before paint
waleedlatif1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
8 changes: 7 additions & 1 deletion
8
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/index.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,10 @@ | ||
| export { resolveFileCategory } from './file-category' | ||
| export type { PreviewMode } from './file-viewer' | ||
| export { FileViewer, isCsvStreamOnly, isPreviewable, isTextEditable } from './file-viewer' | ||
| export { | ||
| FileViewer, | ||
| isCsvStreamOnly, | ||
| isMarkdownFile, | ||
| isPreviewable, | ||
| isTextEditable, | ||
| } from './file-viewer' | ||
| export { PreviewPanel, RICH_PREVIEWABLE_EXTENSIONS, resolvePreviewType } from './preview-panel' |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.