Skip to content
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

code block pasting in chat #233358

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

justschen
Copy link
Contributor

@justschen justschen commented Nov 7, 2024

  • code block pasting
  • undo/redo for pasted chat attachments

cc. @jrieken

@justschen justschen requested a review from mjbvz November 13, 2024 22:28
Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Looks like a good direction. Added a few initial comments on the paste api usage

@justschen justschen marked this pull request as ready for review November 14, 2024 23:06
@vs-code-engineering vs-code-engineering bot added this to the November 2024 milestone Nov 14, 2024
const fileName = file.split('/').pop() || 'unknown file';
const start = ranges.startLineNumber;
const end = ranges.endLineNumber;
const resultText = `Copied Selection of Code: \n\n\n From the file: ${fileName} From lines ${start} to ${end} \n \`\`\`${code}\`\`\``;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be valid markdown? If it does, you can use the createFencedCodeBlock helper with have for copilot as this will handle cases where the code contains triple backticks

src/vs/workbench/contrib/bulkEdit/browser/opaqueEdits.ts Outdated Show resolved Hide resolved
src/vs/workbench/contrib/bulkEdit/browser/opaqueEdits.ts Outdated Show resolved Hide resolved
src/vs/workbench/contrib/bulkEdit/browser/opaqueEdits.ts Outdated Show resolved Hide resolved
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.

3 participants