[Feature Request] Add "Copy as" actions to Results View

オープン
#284 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
postgresql, vscode
領域
desktop, frontend

調査の方向性

Results Viewから始め、既存の"Save as"アクションとその出力形式を確認します。現在、結果がどのようにシリアライズされているかを特定し、そのうえでサポートする"Copy as"形式とUI上の配置を定義します。Results Viewからユーザーが選択した形式をコピーでき、出力が保存時と一貫していれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

There's options to save as JSON, CSV, or even Excel, but my workflows rarely have me saving results. Instead sharing them in chat threads and comment sections of my company's team and project management tools; especially if the results are one-row results.

I'd like to request "Copy As" actions for the Results View.

From a UI/UX perspective, layered icons with your typical "copy" or "clipboard" icon as the top layer and the output format as the bottom layer would be sufficient. You could line them up below the current "Save as" actions in the results view. For short enough viewports, you could probably collapse the "Save as" actions and "Copy as" actions into their own context menus or even have a "..." menu at the bottom of the actions for "the rest".

Useful "Copy As" actions off the top of my head.

  • json
[
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 },
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 },
 {
  "column_a": "lorem ipsum",
  "column_b": 1,
  "column_c": "2026-07-16T21:01:15.861Z"
 }
]
  • csv
column_a,column_b,column_c
lorem ipsum,1,2026-07-16T21:01:15.861Z
lorem ipsum,1,2026-07-16T21:01:15.861Z
lorem ipsum,1,2026-07-16T21:01:15.861Z
  • tsv (tabs shown for reference here)
column_a\tcolumn_b\tcolumn_c
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
lorem ipsum\t1\t2026-07-16T21:01:15.861Z
  • markdown
| column_a | column_b | column_c |
| --- | --- | --- |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1 | 2026-07-16T21:01:15.861Z |
  • fancy text (a format I consistently see in stack overflow, and other forums, answers)
+-------------+----------+--------------------------+
| column_a    | column_b | column_c                 |
+-------------+----------+--------------------------+
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
| lorem ipsum | 1        | 2026-07-16T21:01:15.861Z |
+-------------+----------+--------------------------+

There are rendering questions with regards to certain data-types (i.e. jsonb), but I'll leave those implementation answers to the extension developers and community. I'd expect the outputs to be generally close to how they are outputted when I "Save as".

I recognize, and concede, that large results are better served by the "Save as" actions. Maybe there's a character threshold that disables "Copy as" actions or maybe you just let the users deal with the consequences of copying 10,000 rows of 100 columns to their clipboard. Maybe you prompt for confirmation when a copy would be better served by a save. If I were the user, I would know based on the results whether I'm saving or even attempting to copy anyways.

I'm also sure there are many other formats you could save/copy as. The ones listed are examples of formats I've seen or would want myself. If there's one I'd like first, it's json, because it's the most flexible, and probably easiest to implement of the bunch. Second, markdown because I'm seeing more and more tools support markdown input for AI Agents.

主要言語
言語のデータがありません
スター
395
フォーク
33
平均マージ
1時間 46分
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-pgsql のほかの issue

microsoft/vscode-pgsql の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。