| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <title>sketch-tool-card demo</title> |
| 4 | <link rel="stylesheet" href="demo.css" /> |
| 5 | |
| Philip Zeyliger | 72682df | 2025-04-23 13:09:46 -0700 | [diff] [blame] | 6 | <script type="module" src="../sketch-tool-card.ts"></script> |
| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 7 | |
| 8 | <script> |
| 9 | const toolCalls = [ |
| 10 | { |
| Sean McCullough | fa40c41 | 2025-04-28 20:10:04 +0000 | [diff] [blame] | 11 | name: "multiple-choice", |
| 12 | input: JSON.stringify({ |
| 13 | question: "What is your favorite programming language?", |
| 14 | choices: [ |
| 15 | "JavaScript", |
| 16 | "TypeScript", |
| 17 | "Python", |
| 18 | "Go", |
| 19 | "Rust", |
| 20 | "Java", |
| 21 | "C#", |
| 22 | "C++", |
| 23 | ], |
| 24 | }), |
| 25 | result_message: { |
| 26 | type: "tool", |
| 27 | tool_result: JSON.stringify({ |
| 28 | selected: "Go", |
| 29 | }), |
| 30 | }, |
| 31 | }, |
| 32 | { |
| 33 | name: "multiple-choice", |
| 34 | input: JSON.stringify({ |
| 35 | question: "Which feature would you like to implement next?", |
| 36 | choices: [ |
| 37 | "Dark mode", |
| 38 | "User profiles", |
| 39 | "Social sharing", |
| 40 | "Analytics dashboard", |
| 41 | ], |
| 42 | }), |
| 43 | // No result yet, showing the choices without a selection |
| 44 | }, |
| 45 | { |
| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 46 | name: "bash", |
| 47 | input: JSON.stringify({ |
| 48 | command: |
| 49 | "docker ps -a --format '{{.ID}} {{.Image }} {{.Names}}' | grep sketch | awk '{print $1 }' | xargs -I {} docker rm {} && docker image prune -af", |
| 50 | }), |
| 51 | result_message: { |
| 52 | type: "tool", |
| 53 | tool_result: `Deleted Images: |
| 54 | deleted: sha256:110d4aed8bcc76cb7327412504af8aef31670b816453a3088d834bbeefd11a2c |
| 55 | deleted: sha256:042622460c913078901555a8a72de18e95228fca98b9ac388503b3baafafb683 |
| 56 | deleted: sha256:04ccf3d087e258ffd5f940f378c2aab3c0ed646fb2fb283f90e65397db304694 |
| 57 | deleted: sha256:877120aa3efd02b6afdad181c1cd75bbdc67e41a75dd770fbf781e4fe9c95fc7 |
| 58 | deleted: sha256:d96824c284e594acacc631458818d07842fd4cfa3a1037668a1b23abce077d7b |
| 59 | deleted: sha256:d90eef6007f5782b59643eecb3edab38af6399d4142f0bb306742efa0e1cf6a4 |
| 60 | deleted: sha256:66b006b0d7570ccf7e2afa15e7b6e6385debba0e60e76eb314383215e480a664 |
| 61 | deleted: sha256:834ff90a57edf5c3987a3f21713310d189f209cec7b002a863c75a22e24cc114 |
| 62 | deleted: sha256:735be867a9939611842099b1131e23096fbde47bb326416382ff7a90a86ab687 |
| 63 | deleted: sha256:986792e96058cabe4452eab0fda2694fe2d5f0b951c446c9c1f94d86614f7bc6 |
| 64 | deleted: sha256:01539d19a06b87dd7a2268677c6beb06bc5aed3cde0c52691a684f4d085bc437 |
| 65 | deleted: sha256:d03b7602a43340d6d1e53ad1d7daa5b55740613ad969c360e1377b7af7597eba |
| 66 | deleted: sha256:5a7310817c5fa3e29ebfe5b17031fdc5789543460c790ae2e1039226044a6109 |
| 67 | deleted: sha256:def65005e4b1e48e9531ce6ca6bea682bd8285e32b0748212fb8ace12976f920 |
| 68 | deleted: sha256:3b17b8e4e349ac09bac24da27ec4d65e3dec359645f73bd9a38bf015ca5f8a98 |
| 69 | deleted: sha256:1bef4e5c965c2fa2658954096dbe64dae8f3b1d7d595bdb370d54f4027a95603 |
| 70 | deleted: sha256:16e6b5b274b06916833d3f040ca045a12fe1a6a10bebf5f92338fe6b4c7dbbf7 |
| 71 | deleted: sha256:d90588879cc818bc3b3b575a291a3c4088d0ea1c61fad2c4a2f34160bdc86db6 |
| 72 | deleted: sha256:85903960027c7b9baf8bd0ee662571758ce8ffe83526839377284e2fccac558f |
| 73 | untagged: sketch-94924d08c163:latest |
| 74 | deleted: sha256:7c7c3957d3ba526a351d21e52a1aee0e72bb4a62d0422a0eb3a0e2b53391824f |
| 75 | deleted: sha256:e4a1fe6a3369ca8f24baaba277bc9d97353992e9e051020c5a25e588a702e634 |
| 76 | deleted: sha256:28ccbe834ee66199498458f500b10cc9ea69460216982a537ea3294d6dfb0b63 |
| 77 | deleted: sha256:95c7d2956020039d92b546d6824c5d7fac163a6247be599160483d263094c047 |
| 78 | deleted: sha256:f87bc9eb655a06edd50d5a34e016175006c430ad129146b9b755169a3c318a57 |
| 79 | deleted: sha256:b455829fdcd5fe238567af2370f9fc021eb416ec2140f98b0ab59478febcfb2e |
| 80 | deleted: sha256:ed64271d223807308a391a733fc556a6c16bfb87e6f9aed6d4ce394fcbb77ba6 |
| 81 | deleted: sha256:a5ce6521003bca24abcb4a0021837e789349fb3f44f7ceb00ef4af33ca01f84f |
| 82 | deleted: sha256:57e05db1ff95deab5f5c3f38f9607a1c3bb21518133f4e0c137ffe6bb9cbfde9 |
| 83 | deleted: sha256:540194db01e12f59d19f7795ec9c8a1bb753df2de935469b21a10fc7ca1d25a5 |
| 84 | deleted: sha256:97519dae495c256597a9b7975a332e67edb21f93e306b72132ed2c30bb01b8aa |
| 85 | deleted: sha256:162c7a942156fd5f16616c6fea4a26f2bfa01a53e499d59fdb8c68e815f5350e |
| 86 | deleted: sha256:51b9d76df1fbcb277e4f22496ff661d4d748f499453a27a012629f78bb61107e |
| 87 | deleted: sha256:7a1a595c3015a6b2f5e996988d094bcaca328ebeaafe37403e78322e10d6b859 |
| 88 | deleted: sha256:27631f63a84d9a524381a95168f24deb89612fb468e03bce724f352bb5ef7b3b |
| 89 | deleted: sha256:58746669dff4a4051d05542e05109d57c94f867981b47bdb5800d62567a6280f |
| 90 | untagged: golang:1.24.2-alpine3.21 |
| 91 | untagged: golang@sha256:7772cb5322baa875edd74705556d08f0eeca7b9c4b5367754ce3f2f00041ccee |
| 92 | untagged: sketch-3c262c60c42c:latest |
| 93 | deleted: sha256:fadf166900e61610d77d613ce52ca1c03711ce2a7bcd31f1f634529791c0c107 |
| 94 | deleted: sha256:8b719162dad84cddd630e1e943520041947ca91b3794417c0d2a03b3726ebaa4 |
| 95 | deleted: sha256:444f0e44dcaff517142f8aab35d35f08536d886a746f6858dac7052977ee2cff |
| 96 | deleted: sha256:a95a3660958ed25a27ae7b0622b5426e046d4c5587693aa7c0098e050e057311 |
| 97 | deleted: sha256:edb781114acb505bbde5e4a3db68b7ab6f4a3c0da92ceed2d10f02c6278b93c8 |
| 98 | deleted: sha256:1429402020a73b7d5c1de32f9451c68e22508cc4238750f5a500e1d9737eedae |
| 99 | deleted: sha256:3f749e03b0f5ef2dfc538581c92230f2cd6b844fe3c734c728fd3775865ed24c |
| 100 | deleted: sha256:f62c6ba2d4f4b94796d4c4c111031fbbbaf22df24623a2d6729277dc1eaf8da8 |
| 101 | deleted: sha256:504579f990b8894755910252d3b401f86a589709efafb30b9ded67cb3edad80e |
| 102 | deleted: sha256:2e22f953ef8cc5fac95fb0babc5042f5e2a7fefc9d5ec444429c490d54acb1ab |
| 103 | deleted: sha256:afa0c23676c039532a39faa1f1506b19f34507b586796ea070dcaee30e6228ef |
| 104 | deleted: sha256:5f176f397253734bdc726a505c84448f9b00e5652d9a28ef59de0581a2e8e923 |
| 105 | deleted: sha256:253afbfd579bc6daf71e42b0f1e369d2b6c9015028191af4478da0b77b8a85ed |
| 106 | deleted: sha256:81f79e13183887f93db52268f00975f43613abc520c88e1090a1dbb3d09094e9 |
| 107 | deleted: sha256:3c0b6f56bdbec5bf995b818e8a67d2d6c3bd9aa3698c403b6dabc01a81a4cb52 |
| 108 | deleted: sha256:635f4ba57c6445e69cf8c6fba61c3690f76901e17334f6d2d165979b2d387dfa |
| 109 | |
| 110 | Total reclaimed space: 1.426GB`, |
| 111 | }, |
| 112 | }, |
| 113 | { |
| 114 | name: "bash", |
| 115 | input: JSON.stringify({ |
| 116 | command: "ls -a", |
| 117 | }), |
| 118 | result_message: { |
| 119 | type: "tool", |
| 120 | tool_result: ".\n..", |
| 121 | }, |
| 122 | }, |
| 123 | { |
| 124 | name: "bash", |
| 125 | input: JSON.stringify({ |
| 126 | command: "sleep 200", |
| 127 | }), |
| 128 | result_message: { |
| 129 | type: "tool", |
| 130 | tool_error: "the user canceled this operation", |
| 131 | }, |
| 132 | }, |
| 133 | { |
| 134 | name: "title", |
| 135 | input: JSON.stringify({ |
| 136 | title: "a new title for this sketch", |
| 137 | }), |
| 138 | }, |
| 139 | { |
| 140 | name: "codereview", |
| 141 | input: "{}", |
| 142 | tool_call_id: "toolu_01WT5qQwHZgdogfKhkD8R9PZ", |
| 143 | result_message: { |
| 144 | type: "tool", |
| 145 | end_of_turn: false, |
| 146 | content: "", |
| 147 | tool_name: "codereview", |
| 148 | input: "{}", |
| 149 | tool_result: "OK", |
| 150 | tool_call_id: "toolu_01WT5qQwHZgdogfKhkD8R9PZ", |
| 151 | timestamp: "2025-04-14T16:33:17.575759565Z", |
| 152 | conversation_id: "xsa-8hw0", |
| 153 | start_time: "2025-04-14T16:33:07.11793816Z", |
| 154 | end_time: "2025-04-14T16:33:17.57575719Z", |
| 155 | elapsed: 10457819031, |
| 156 | idx: 45, |
| 157 | }, |
| 158 | }, |
| 159 | { |
| 160 | name: "codereview", |
| 161 | input: "{}", |
| 162 | tool_call_id: "toolu_01WT5qQwHZgdogfKhkD8R9PZ", |
| 163 | result_message: { |
| 164 | type: "tool", |
| 165 | end_of_turn: false, |
| 166 | content: "", |
| 167 | tool_name: "codereview", |
| 168 | input: "{}", |
| 169 | tool_result: "Not OK", |
| 170 | tool_call_id: "toolu_01WT5qQwHZgdogfKhkD8R9PZ", |
| 171 | timestamp: "2025-04-14T16:33:17.575759565Z", |
| 172 | conversation_id: "xsa-8hw0", |
| 173 | start_time: "2025-04-14T16:33:07.11793816Z", |
| 174 | end_time: "2025-04-14T16:33:17.57575719Z", |
| 175 | elapsed: 10457819031, |
| 176 | idx: 45, |
| 177 | }, |
| 178 | }, |
| 179 | { |
| 180 | name: "think", |
| 181 | input: |
| 182 | '{"thoughts":"I\'m going to inspect a few key components to understand their purpose and relationships:\\n1. sketch-app-shell.ts - Appears to be the main container component\\n2. sketch-timeline.ts - Likely manages the chat timeline\\n3. sketch-view-mode-select.ts - Handles switching between different views\\n\\nThis will help me create a comprehensive README that explains the components and their relationships."}', |
| 183 | tool_call_id: "toolu_01R1g5mQVgKxEJZFNp9QGvUr", |
| 184 | result_message: { |
| 185 | type: "tool", |
| 186 | end_of_turn: false, |
| 187 | content: "", |
| 188 | tool_name: "think", |
| 189 | input: |
| 190 | '{"thoughts":"I\'m going to inspect a few key components to understand their purpose and relationships:\\n1. sketch-app-shell.ts - Appears to be the main container component\\n2. sketch-timeline.ts - Likely manages the chat timeline\\n3. sketch-view-mode-select.ts - Handles switching between different views\\n\\nThis will help me create a comprehensive README that explains the components and their relationships."}', |
| 191 | tool_result: "recorded", |
| 192 | tool_call_id: "toolu_01R1g5mQVgKxEJZFNp9QGvUr", |
| 193 | timestamp: "2025-04-14T16:32:14.12647133Z", |
| 194 | conversation_id: "xsa-8hw0", |
| 195 | start_time: "2025-04-14T16:32:14.126454329Z", |
| 196 | end_time: "2025-04-14T16:32:14.126468539Z", |
| 197 | elapsed: 14209, |
| 198 | idx: 18, |
| 199 | }, |
| 200 | }, |
| 201 | { |
| 202 | name: "patch", |
| 203 | input: |
| Philip Zeyliger | 2032b1c | 2025-04-23 19:40:42 -0700 | [diff] [blame] | 204 | '{"path":"/app/webui/src/web-components/README.md","patches":[{"operation":"overwrite","newText":"# Web Components\\n\\nThis directory contains the custom web components used in the Loop WebUI. These components are built using the [Lit](https://lit.dev/) library for creating fast, lightweight web components with a declarative template system.\\n\\n## Component Architecture\\n\\nThe components follow a hierarchical structure that creates a complete UI for interacting with the CodingAgent:\\n\\n```\\nsketch-app-shell (main container)\\n├── sketch-container-status\\n├── sketch-network-status\\n├── sketch-view-mode-select\\n├── sketch-timeline (chat view)\\n│ └── sketch-timeline-message\\n│ └── sketch-tool-calls\\n├── sketch-diff-view (code diff view)\\n└── sketch-chat-input\\n```\\n\\n## Component Overview\\n\\n### sketch-app-shell.ts\\nThe main container component that orchestrates the entire UI. It manages:\\n- View modes (chat, diff, charts, terminal)\\n- Network status and connection management\\n- Timeline data fetching and rendering\\n- Auto-scrolling behavior for chat messages\\n\\n### sketch-chat-input.ts\\nHandles user input for sending messages to the CodingAgent:\\n- Text input area with markdown support\\n- Send button and keyboard shortcuts (Enter to send, Shift+Enter for newline)\\n- Auto-focusing behavior\\n\\n### sketch-container-status.ts\\nDisplays information about the container environment:\\n- OS information\\n- Resource usage (CPU, memory)\\n- Container status indicators\\n\\n### sketch-diff-view.ts\\nProvides a visual diff viewer for code changes:\\n- Git commit display\\n- Side-by-side or unified diff viewing\\n- Syntax highlighting for code\\n- Comment creation for code review\\n\\n### sketch-network-status.ts\\nShows the current connection status to the server:\\n- Connected/disconnected indicators\\n- Error messages when connection issues occur\\n- Visual feedback on connection state\\n\\n### sketch-timeline.ts\\nDisplays the conversation history between user and CodingAgent:\\n- Message rendering\\n- Manages the sequence of messages\\n- Handles scrolling behavior\\n\\n### sketch-timeline-message.ts\\nRenders individual messages in the timeline:\\n- Different styling for user vs. agent messages\\n- Markdown rendering with syntax highlighting\\n- Handles special message types\\n\\n### sketch-tool-calls.ts\\nDisplays tool call information within messages:\\n- Tool call parameters and outputs\\n- Expandable/collapsible sections for tool details\\n- Syntax highlighting for code in tool outputs\\n\\n### sketch-view-mode-select.ts\\nProvides UI for switching between different views:\\n- Chat view for conversation\\n- Diff view for code changes\\n- Charts view for data visualization\\n- Terminal view for command execution\\n\\n## Development\\n\\n### Creating New Components\\n\\nWhen creating new components, follow these patterns:\\n\\n1. Use the `@customElement` decorator to define the component\\n2. Encapsulate styles using the static `styles` property\\n3. Use Lit\'s reactive properties (`@property`, `@state`) to manage component state\\n4. Implement lifecycle methods as needed (`connectedCallback`, `disconnectedCallback`, etc.)\\n\\n### Example\\n\\n```typescript\\nimport { css, html, LitElement } from \'lit\';\\nimport { customElement, property } from \'lit/decorators.js\';\\n\\n@customElement(\'sketch-new-component\')\\nexport class SketchNewComponent extends LitElement {\\n @property()\\n myProperty: string = \'default\';\\n\\n static styles = css`\\n :host {\\n display: block;\\n }\\n `;\\n\\n render() {\\n return html`\\n <div>\\n ${this.myProperty}\\n </div>\\n `;\\n }\\n}\\n\\ndeclare global {\\n interface HTMLElementTagNameMap {\\n \'sketch-new-component\': SketchNewComponent;\\n }\\n}\\n```\\n\\n### Best Practices\\n\\n1. Maintain a single responsibility for each component\\n2. Use properties and events for parent-child communication\\n3. Document the purpose and API of each component\\n4. Write tests for components where possible\\n5. Keep styles encapsulated within components\\n6. Use type definitions for strong typing\\n\\n## Related Resources\\n\\n- [Lit Documentation](https://lit.dev/docs/)\\n- [Web Components Introduction](https://developer.mozilla.org/en-US/docs/Web/Web_Components)\\n- See `/app/webui/readme.md` for more information on the Loop WebUI project\\n"}]}', |
| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 205 | tool_call_id: "toolu_01TNhLX2AWkZwsu2KCLKrpju", |
| 206 | result_message: { |
| 207 | type: "tool", |
| 208 | end_of_turn: false, |
| 209 | content: "", |
| 210 | tool_name: "patch", |
| 211 | input: |
| Philip Zeyliger | 2032b1c | 2025-04-23 19:40:42 -0700 | [diff] [blame] | 212 | '{"path":"/app/webui/src/web-components/README.md","patches":[{"operation":"overwrite","newText":"# Web Components\\n\\nThis directory contains the custom web components used in the Loop WebUI. These components are built using the [Lit](https://lit.dev/) library for creating fast, lightweight web components with a declarative template system.\\n\\n## Component Architecture\\n\\nThe components follow a hierarchical structure that creates a complete UI for interacting with the CodingAgent:\\n\\n```\\nsketch-app-shell (main container)\\n├── sketch-container-status\\n├── sketch-network-status\\n├── sketch-view-mode-select\\n├── sketch-timeline (chat view)\\n│ └── sketch-timeline-message\\n│ └── sketch-tool-calls\\n├── sketch-diff-view (code diff view)\\n└── sketch-chat-input\\n```\\n\\n## Component Overview\\n\\n### sketch-app-shell.ts\\nThe main container component that orchestrates the entire UI. It manages:\\n- View modes (chat, diff, charts, terminal)\\n- Network status and connection management\\n- Timeline data fetching and rendering\\n- Auto-scrolling behavior for chat messages\\n\\n### sketch-chat-input.ts\\nHandles user input for sending messages to the CodingAgent:\\n- Text input area with markdown support\\n- Send button and keyboard shortcuts (Enter to send, Shift+Enter for newline)\\n- Auto-focusing behavior\\n\\n### sketch-container-status.ts\\nDisplays information about the container environment:\\n- OS information\\n- Resource usage (CPU, memory)\\n- Container status indicators\\n\\n### sketch-diff-view.ts\\nProvides a visual diff viewer for code changes:\\n- Git commit display\\n- Side-by-side or unified diff viewing\\n- Syntax highlighting for code\\n- Comment creation for code review\\n\\n### sketch-network-status.ts\\nShows the current connection status to the server:\\n- Connected/disconnected indicators\\n- Error messages when connection issues occur\\n- Visual feedback on connection state\\n\\n### sketch-timeline.ts\\nDisplays the conversation history between user and CodingAgent:\\n- Message rendering\\n- Manages the sequence of messages\\n- Handles scrolling behavior\\n\\n### sketch-timeline-message.ts\\nRenders individual messages in the timeline:\\n- Different styling for user vs. agent messages\\n- Markdown rendering with syntax highlighting\\n- Handles special message types\\n\\n### sketch-tool-calls.ts\\nDisplays tool call information within messages:\\n- Tool call parameters and outputs\\n- Expandable/collapsible sections for tool details\\n- Syntax highlighting for code in tool outputs\\n\\n### sketch-view-mode-select.ts\\nProvides UI for switching between different views:\\n- Chat view for conversation\\n- Diff view for code changes\\n- Charts view for data visualization\\n- Terminal view for command execution\\n\\n## Development\\n\\n### Creating New Components\\n\\nWhen creating new components, follow these patterns:\\n\\n1. Use the `@customElement` decorator to define the component\\n2. Encapsulate styles using the static `styles` property\\n3. Use Lit\'s reactive properties (`@property`, `@state`) to manage component state\\n4. Implement lifecycle methods as needed (`connectedCallback`, `disconnectedCallback`, etc.)\\n\\n### Example\\n\\n```typescript\\nimport { css, html, LitElement } from \'lit\';\\nimport { customElement, property } from \'lit/decorators.js\';\\n\\n@customElement(\'sketch-new-component\')\\nexport class SketchNewComponent extends LitElement {\\n @property()\\n myProperty: string = \'default\';\\n\\n static styles = css`\\n :host {\\n display: block;\\n }\\n `;\\n\\n render() {\\n return html`\\n <div>\\n ${this.myProperty}\\n </div>\\n `;\\n }\\n}\\n\\ndeclare global {\\n interface HTMLElementTagNameMap {\\n \'sketch-new-component\': SketchNewComponent;\\n }\\n}\\n```\\n\\n### Best Practices\\n\\n1. Maintain a single responsibility for each component\\n2. Use properties and events for parent-child communication\\n3. Document the purpose and API of each component\\n4. Write tests for components where possible\\n5. Keep styles encapsulated within components\\n6. Use type definitions for strong typing\\n\\n## Related Resources\\n\\n- [Lit Documentation](https://lit.dev/docs/)\\n- [Web Components Introduction](https://developer.mozilla.org/en-US/docs/Web/Web_Components)\\n- See `/app/webui/readme.md` for more information on the Loop WebUI project\\n"}]}', |
| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 213 | tool_result: "- Applied all patches\n", |
| 214 | tool_call_id: "toolu_01TNhLX2AWkZwsu2KCLKrpju", |
| 215 | timestamp: "2025-04-14T16:32:47.10299854Z", |
| 216 | conversation_id: "xsa-8hw0", |
| 217 | start_time: "2025-04-14T16:32:47.101660683Z", |
| 218 | end_time: "2025-04-14T16:32:47.102994206Z", |
| 219 | elapsed: 1333524, |
| 220 | idx: 34, |
| 221 | }, |
| 222 | }, |
| 223 | { |
| 224 | name: "done", |
| 225 | input: |
| 226 | '{"checklist_items":{"code_reviewed":{"status":"yes","description":"If any commits were made, the codereview tool was run and its output was addressed.","comments":"Since this commit only adds a documentation file (README.md) with no functional code changes, a formal code review is not essential, but I\'ve verified the content for accuracy and completeness."},"wrote_tests":{"status":"not applicable","description":"If code was changed, tests were written or updated.","comments":"No code was changed; only documentation was added. The README file is purely informational and doesn\'t require tests."},"passes_tests":{"status":"not applicable","description":"If any commits were made, tests pass.","comments":"No functional code changes were made that would impact existing tests. The addition of a README file is a documentation-only change."},"git_commit":{"status":"yes","description":"Create git commits for any code changes you made. Match the style of recent commit messages. Include \'Co-Authored-By: sketch\' and the original user prompt. Use GIT_AUTHOR_NAME=\\"Sean McCullough\\" GIT_AUTHOR_EMAIL=\\"banksean@gmail.com\\" (not git config).","comments":"Created a commit with a descriptive message that follows the requested format, including \'Co-Authored-By: sketch\' attribution."}}}', |
| 227 | tool_call_id: "toolu_01HPgWQJF1aF9LUqkdDKWeES", |
| 228 | result_message: { |
| 229 | type: "tool", |
| 230 | end_of_turn: false, |
| 231 | content: "", |
| 232 | tool_name: "done", |
| 233 | input: |
| 234 | '{"checklist_items":{"code_reviewed":{"status":"yes","description":"If any commits were made, the codereview tool was run and its output was addressed.","comments":"Since this commit only adds a documentation file (README.md) with no functional code changes, a formal code review is not essential, but I\'ve verified the content for accuracy and completeness."},"wrote_tests":{"status":"not applicable","description":"If code was changed, tests were written or updated.","comments":"No code was changed; only documentation was added. The README file is purely informational and doesn\'t require tests."},"passes_tests":{"status":"not applicable","description":"If any commits were made, tests pass.","comments":"No functional code changes were made that would impact existing tests. The addition of a README file is a documentation-only change."},"git_commit":{"status":"yes","description":"Create git commits for any code changes you made. Match the style of recent commit messages. Include \'Co-Authored-By: sketch\' and the original user prompt. Use GIT_AUTHOR_NAME=\\"Sean McCullough\\" GIT_AUTHOR_EMAIL=\\"banksean@gmail.com\\" (not git config).","comments":"Created a commit with a descriptive message that follows the requested format, including \'Co-Authored-By: sketch\' attribution."}}}', |
| 235 | tool_result: |
| 236 | "codereview tool has not been run for commit 0b1f45dc17fbe7800f5164993ec99d6564256787", |
| 237 | tool_error: true, |
| 238 | tool_call_id: "toolu_01HPgWQJF1aF9LUqkdDKWeES", |
| 239 | timestamp: "2025-04-14T16:33:04.639179373Z", |
| 240 | conversation_id: "xsa-8hw0", |
| 241 | start_time: "2025-04-14T16:33:04.616273148Z", |
| 242 | end_time: "2025-04-14T16:33:04.639173456Z", |
| 243 | elapsed: 22900309, |
| 244 | idx: 43, |
| 245 | }, |
| 246 | }, |
| 247 | ]; |
| 248 | document.addEventListener("DOMContentLoaded", () => { |
| 249 | toolCalls.forEach((toolCall) => { |
| 250 | const h2El = document.createElement("h2"); |
| 251 | h2El.innerText = toolCall.name; |
| 252 | document.body.append(h2El); |
| 253 | |
| 254 | let toolCardEl = document.createElement("sketch-tool-card-generic"); |
| 255 | switch (toolCall.name) { |
| 256 | case "bash": |
| 257 | toolCardEl = document.createElement("sketch-tool-card-bash"); |
| 258 | break; |
| 259 | case "codereview": |
| 260 | toolCardEl = document.createElement( |
| 261 | "sketch-tool-card-codereview", |
| 262 | ); |
| 263 | break; |
| 264 | case "done": |
| 265 | toolCardEl = document.createElement("sketch-tool-card-done"); |
| 266 | break; |
| 267 | case "patch": |
| 268 | toolCardEl = document.createElement("sketch-tool-card-patch"); |
| 269 | break; |
| 270 | case "think": |
| 271 | toolCardEl = document.createElement("sketch-tool-card-think"); |
| 272 | break; |
| 273 | case "title": |
| 274 | toolCardEl = document.createElement("sketch-tool-card-title"); |
| 275 | break; |
| Sean McCullough | fa40c41 | 2025-04-28 20:10:04 +0000 | [diff] [blame] | 276 | case "multiple-choice": |
| 277 | toolCardEl = document.createElement( |
| 278 | "sketch-tool-card-multiple-choice", |
| 279 | ); |
| 280 | break; |
| Sean McCullough | ec3ad1a | 2025-04-18 13:55:16 -0700 | [diff] [blame] | 281 | } |
| 282 | toolCardEl.toolCall = toolCall; |
| 283 | toolCardEl.open = true; |
| 284 | document.body.append(toolCardEl); |
| 285 | }); |
| 286 | }); |
| 287 | </script> |
| 288 | </head> |
| 289 | <body> |
| 290 | <h1>sketch-tool-calls demo</h1> |
| 291 | |
| 292 | <sketch-tool-calls></sketch-tool-calls> |
| 293 | </body> |
| 294 | </html> |