| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 1 | import { html } from "lit"; |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 2 | import { customElement } from "lit/decorators.js"; |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 3 | import { SketchTailwindElement } from "./sketch-tailwind-element.js"; |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 4 | |
| 5 | /** |
| 6 | * A component that displays helpful information when the diff view is empty |
| 7 | */ |
| 8 | @customElement("sketch-diff-empty-view") |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 9 | export class SketchDiffEmptyView extends SketchTailwindElement { |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 10 | render() { |
| 11 | return html` |
| Autoformatter | 9f5cb2e | 2025-07-03 00:25:35 +0000 | [diff] [blame] | 12 | <div |
| 13 | class="flex flex-col items-center justify-center h-full w-full box-border" |
| 14 | > |
| 15 | <div |
| 16 | class="m-8 mx-auto max-w-4xl w-11/12 p-8 border-2 border-gray-300 rounded-lg shadow-sm bg-white text-center" |
| 17 | > |
| 18 | <h2 class="text-2xl font-semibold mb-6 text-center text-gray-800"> |
| 19 | How to use the Diff View |
| 20 | </h2> |
| Autoformatter | 8c46362 | 2025-05-16 21:54:17 +0000 | [diff] [blame] | 21 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 22 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| 23 | By default, the diff view shows differences between when you started |
| Autoformatter | 9f5cb2e | 2025-07-03 00:25:35 +0000 | [diff] [blame] | 24 | Sketch (the "sketch-base" tag) and the current state. Choose a |
| 25 | commit to look at, or, a range of commits, and navigate across |
| 26 | files. |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 27 | </p> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 28 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 29 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| Autoformatter | 9f5cb2e | 2025-07-03 00:25:35 +0000 | [diff] [blame] | 30 | You can select text to leave comments on the code. These will be |
| 31 | added to your chat window, and you can click Send to send them along |
| 32 | to the agent, which will respond in the chat window. |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 33 | </p> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 34 | |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 35 | <p class="text-gray-600 leading-relaxed text-base text-left mb-4"> |
| Autoformatter | 9f5cb2e | 2025-07-03 00:25:35 +0000 | [diff] [blame] | 36 | If the range includes |
| 37 | <strong class="font-semibold text-gray-800" |
| 38 | >Uncommitted Changes</strong |
| 39 | >, you can |
| 40 | <strong class="font-semibold text-gray-800">edit</strong> the text |
| 41 | as well, and it auto-saves. If you want to clear up a comment or |
| 42 | write your own text, just go ahead and do it! Once you're done, |
| 43 | though, be sure to commit your changes, either by asking the agent |
| 44 | to do so or in the Terminal view. |
| banksean | 5450584 | 2025-07-03 00:18:44 +0000 | [diff] [blame] | 45 | </p> |
| 46 | </div> |
| Philip Zeyliger | 272a90e | 2025-05-16 14:49:51 -0700 | [diff] [blame] | 47 | </div> |
| 48 | `; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | declare global { |
| 53 | interface HTMLElementTagNameMap { |
| 54 | "sketch-diff-empty-view": SketchDiffEmptyView; |
| 55 | } |
| 56 | } |