index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <title>Agent Lab</title>
  7. <link rel="stylesheet" href="/static/styles.css" />
  8. </head>
  9. <body>
  10. <header class="topbar">
  11. <h1>Agent Lab</h1>
  12. <div class="top-actions">
  13. <div id="connection-status" class="status">Idle</div>
  14. </div>
  15. </header>
  16. <main class="layout">
  17. <aside class="panel controls">
  18. <section class="tools-section">
  19. <div class="section-head">
  20. <h2>Tools <span id="tool-count">0 selected</span></h2>
  21. <div class="button-row compact">
  22. <button id="select-all-tools" type="button">All</button>
  23. <button id="clear-tools" type="button">None</button>
  24. </div>
  25. </div>
  26. <div id="tool-list" class="stack">Loading tools...</div>
  27. </section>
  28. <section>
  29. <h2>Agent Config</h2>
  30. <div class="button-row two">
  31. <button id="open-chat-config-panel" type="button">Chat Agent</button>
  32. <button id="open-event-config-panel" type="button">Event Agent</button>
  33. </div>
  34. </section>
  35. <section class="snapshot-section">
  36. <h2>Workspace Snapshot</h2>
  37. <label>Name <input id="workspace-snapshot-name" placeholder="debug workspace" /></label>
  38. <label>
  39. Saved Snapshot
  40. <select id="saved-workspace-snapshots"></select>
  41. </label>
  42. <div class="button-row">
  43. <button id="save-workspace-snapshot" type="button">Save</button>
  44. <button id="load-workspace-snapshot" type="button">Load</button>
  45. <button id="delete-workspace-snapshot" type="button">Delete</button>
  46. </div>
  47. </section>
  48. </aside>
  49. <section class="workspace">
  50. <div id="messages" class="messages"></div>
  51. <div class="stats">
  52. <div><span>Tokens</span><strong id="stat-tokens">0</strong></div>
  53. <div><span>Cached</span><strong id="stat-cached">0</strong></div>
  54. <div><span>TTFT</span><strong id="stat-ttft">-</strong></div>
  55. <div><span>Elapsed</span><strong id="stat-elapsed">-</strong></div>
  56. </div>
  57. <form id="chat-form" class="composer">
  58. <textarea id="user-message" rows="3" placeholder="Send a debug message"></textarea>
  59. <button id="run-button" type="submit">Run</button>
  60. </form>
  61. </section>
  62. </main>
  63. <dialog id="chat-config-dialog" class="modal">
  64. <form method="dialog" class="modal-shell">
  65. <div class="modal-head">
  66. <h2>Chat Agent Config</h2>
  67. <button id="close-chat-config" type="button">Close</button>
  68. </div>
  69. <section>
  70. <label>Model <input id="model" placeholder="Backend default" /></label>
  71. <label>Temperature <input id="temperature" type="number" min="0" max="2" step="0.1" value="0.2" /></label>
  72. <label>Max Tokens <input id="max-tokens" type="number" min="1" step="1" value="800" /></label>
  73. <fieldset>
  74. <legend>Extra Body</legend>
  75. <label class="checkbox"><input id="chat-thinking-disabled" type="checkbox" checked /> Disable thinking</label>
  76. <label class="checkbox"><input id="chat-enable-search" type="checkbox" /> Enable search</label>
  77. <label class="checkbox"><input id="chat-forced-search" type="checkbox" /> Forced search</label>
  78. </fieldset>
  79. </section>
  80. <section>
  81. <div class="section-head">
  82. <h2>Prompt List</h2>
  83. <button id="add-system-prompt" type="button">Add</button>
  84. </div>
  85. <div id="system-prompts" class="prompt-list stack">
  86. <div class="prompt-item" draggable="true" data-prompt-kind="custom" data-prompt-role="system">
  87. <div class="prompt-item-head">
  88. <div class="prompt-meta">
  89. <span class="prompt-type">type: system</span>
  90. <span class="prompt-title">Custom</span>
  91. </div>
  92. <div class="prompt-actions">
  93. <button class="move-prompt-up" type="button">Up</button>
  94. <button class="move-prompt-down" type="button">Down</button>
  95. <button class="delete-system-prompt" type="button">Delete</button>
  96. </div>
  97. </div>
  98. <textarea class="system-prompt" rows="3">You are a debugging assistant.</textarea>
  99. </div>
  100. <div class="prompt-item event-prompt" draggable="true" data-prompt-kind="event_agent_system" data-prompt-role="system">
  101. <div class="prompt-item-head">
  102. <div class="prompt-meta">
  103. <span class="prompt-type">type: system</span>
  104. <span class="prompt-title">EventAgent Rules</span>
  105. </div>
  106. <div class="prompt-actions">
  107. <button class="move-prompt-up" type="button">Up</button>
  108. <button class="move-prompt-down" type="button">Down</button>
  109. </div>
  110. </div>
  111. <textarea class="system-prompt" rows="7" readonly></textarea>
  112. </div>
  113. </div>
  114. </section>
  115. <section>
  116. <div class="section-head">
  117. <h2>Pre Messages</h2>
  118. <button id="add-pre-message" type="button">Add</button>
  119. </div>
  120. <div id="pre-messages" class="stack"></div>
  121. </section>
  122. </form>
  123. </dialog>
  124. <dialog id="event-config-dialog" class="modal">
  125. <form method="dialog" class="modal-shell">
  126. <div class="modal-head">
  127. <h2>Event Agent Config</h2>
  128. <button id="close-event-config" type="button">Close</button>
  129. </div>
  130. <section>
  131. <label>Model <input id="event-model" placeholder="Same as ChatAgent" /></label>
  132. <label>Temperature <input id="event-temperature" type="number" min="0" max="2" step="0.1" value="0.2" /></label>
  133. <label>Max Tokens <input id="event-max-tokens" type="number" min="1" step="1" value="800" /></label>
  134. <label>System Prompt <textarea id="event-system-prompt" rows="5" placeholder="Optional EventAgent system prompt"></textarea></label>
  135. <label>Max Loops <input id="max-event-loops" type="number" min="1" step="1" value="1" /></label>
  136. <fieldset>
  137. <legend>Extra Body</legend>
  138. <label class="checkbox"><input id="event-thinking-disabled" type="checkbox" checked /> Disable thinking</label>
  139. <label class="checkbox"><input id="event-enable-search" type="checkbox" /> Enable search</label>
  140. <label class="checkbox"><input id="event-forced-search" type="checkbox" /> Forced search</label>
  141. </fieldset>
  142. </section>
  143. </form>
  144. </dialog>
  145. <template id="pre-message-template">
  146. <div class="pre-message">
  147. <select class="pre-role">
  148. <option value="user">user</option>
  149. <option value="assistant">assistant</option>
  150. <option value="system">system</option>
  151. </select>
  152. <textarea class="pre-content" rows="3"></textarea>
  153. </div>
  154. </template>
  155. <script src="/static/app.js?v=20260706-workspace-snapshot"></script>
  156. </body>
  157. </html>