Commit 5ca8fee
Add summarize selection context menu feature (#130)
* feat: add Summarize Selection context menu command
- Add new context menu item in Noted submenu for summarizing selected text
- Works in any file (not just Notes folder)
- Uses VS Code LLM API (GitHub Copilot) for AI-powered summarization
- Generates concise 2-3 sentence summary
- Inserts summary below selection with "## Summary of Selection" header
- Shows error message if Copilot is unavailable
* fix: add empty line before Summary of Selection header
* Update src/commands/summarizationCommands.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* fix: pass cancellation token to summarizeSelection and simplify insertion
- Add cancellation token parameter to summarizeSelection method
- Pass token from withProgress to enable proper cancellation
- Simplify insertion logic to always insert at end of selection line
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 7e78493 commit 5ca8fee
File tree
4 files changed
+119
-3
lines changed- src
- commands
- services
4 files changed
+119
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
684 | 689 | | |
685 | 690 | | |
686 | 691 | | |
| |||
806 | 811 | | |
807 | 812 | | |
808 | 813 | | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
809 | 819 | | |
810 | 820 | | |
811 | 821 | | |
812 | | - | |
| 822 | + | |
813 | 823 | | |
814 | 824 | | |
815 | 825 | | |
816 | 826 | | |
817 | | - | |
| 827 | + | |
818 | 828 | | |
819 | 829 | | |
820 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
344 | 404 | | |
345 | 405 | | |
346 | 406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2081 | 2081 | | |
2082 | 2082 | | |
2083 | 2083 | | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2084 | 2088 | | |
2085 | 2089 | | |
2086 | 2090 | | |
| |||
2226 | 2230 | | |
2227 | 2231 | | |
2228 | 2232 | | |
2229 | | - | |
| 2233 | + | |
2230 | 2234 | | |
2231 | 2235 | | |
2232 | 2236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
529 | 571 | | |
0 commit comments