index.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. <button id="open-prompt-config" type="button">Prompt Config</button>
  14. <div id="connection-status" class="status">Idle</div>
  15. </div>
  16. </header>
  17. <main class="layout">
  18. <aside class="panel controls">
  19. <section class="tools-section">
  20. <div class="section-head">
  21. <h2>Tools <span id="tool-count">0 selected</span></h2>
  22. <div class="button-row compact">
  23. <button id="select-all-tools" type="button">All</button>
  24. <button id="clear-tools" type="button">None</button>
  25. </div>
  26. </div>
  27. <div id="tool-list" class="stack">Loading tools...</div>
  28. </section>
  29. <section>
  30. <h2>Agent Config</h2>
  31. <div class="button-row two">
  32. <button id="open-chat-config-panel" type="button">Chat Agent</button>
  33. <button id="open-event-config-panel" type="button">Event Agent</button>
  34. </div>
  35. </section>
  36. </aside>
  37. <section class="workspace">
  38. <div id="messages" class="messages"></div>
  39. <div class="stats">
  40. <div><span>Tokens</span><strong id="stat-tokens">0</strong></div>
  41. <div><span>Cached</span><strong id="stat-cached">0</strong></div>
  42. <div><span>TTFT</span><strong id="stat-ttft">-</strong></div>
  43. <div><span>Elapsed</span><strong id="stat-elapsed">-</strong></div>
  44. </div>
  45. <form id="chat-form" class="composer">
  46. <textarea id="user-message" rows="3" placeholder="Send a debug message"></textarea>
  47. <button id="run-button" type="submit">Run</button>
  48. </form>
  49. </section>
  50. </main>
  51. <dialog id="prompt-dialog" class="modal">
  52. <form method="dialog" class="modal-shell">
  53. <div class="modal-head">
  54. <h2>Prompt Workspace</h2>
  55. <button id="close-prompt-config" type="button">Close</button>
  56. </div>
  57. <section>
  58. <label>Name <input id="prompt-set-name" placeholder="default debugger" /></label>
  59. <label>
  60. Saved Set
  61. <select id="saved-prompt-sets"></select>
  62. </label>
  63. <div class="button-row">
  64. <button id="save-prompt-set" type="button">Save</button>
  65. <button id="load-prompt-set" type="button">Load</button>
  66. <button id="delete-prompt-set" type="button">Delete</button>
  67. </div>
  68. </section>
  69. <section>
  70. <div class="section-head">
  71. <h2>System Prompts</h2>
  72. <button id="add-system-prompt" type="button">Add</button>
  73. </div>
  74. <div id="system-prompts" class="stack">
  75. <textarea class="system-prompt" rows="4">You are a debugging assistant.</textarea>
  76. </div>
  77. </section>
  78. <section>
  79. <div class="section-head">
  80. <h2>Pre Messages</h2>
  81. <button id="add-pre-message" type="button">Add</button>
  82. </div>
  83. <div id="pre-messages" class="stack"></div>
  84. </section>
  85. </form>
  86. </dialog>
  87. <dialog id="chat-config-dialog" class="modal">
  88. <form method="dialog" class="modal-shell">
  89. <div class="modal-head">
  90. <h2>Chat Agent Config</h2>
  91. <button id="close-chat-config" type="button">Close</button>
  92. </div>
  93. <section>
  94. <label>Model <input id="model" placeholder="Backend default" /></label>
  95. <label>Temperature <input id="temperature" type="number" min="0" max="2" step="0.1" value="0.2" /></label>
  96. <label>Max Tokens <input id="max-tokens" type="number" min="1" step="1" value="800" /></label>
  97. <label>System Prompt <textarea id="chat-system-prompt" rows="5" placeholder="Optional ChatAgent system prompt"></textarea></label>
  98. <fieldset>
  99. <legend>Extra Body</legend>
  100. <label class="checkbox"><input id="chat-thinking-disabled" type="checkbox" checked /> Disable thinking</label>
  101. <label class="checkbox"><input id="chat-enable-search" type="checkbox" /> Enable search</label>
  102. <label class="checkbox"><input id="chat-forced-search" type="checkbox" /> Forced search</label>
  103. </fieldset>
  104. </section>
  105. </form>
  106. </dialog>
  107. <dialog id="event-config-dialog" class="modal">
  108. <form method="dialog" class="modal-shell">
  109. <div class="modal-head">
  110. <h2>Event Agent Config</h2>
  111. <button id="close-event-config" type="button">Close</button>
  112. </div>
  113. <section>
  114. <label>Model <input id="event-model" placeholder="Same as ChatAgent" /></label>
  115. <label>Temperature <input id="event-temperature" type="number" min="0" max="2" step="0.1" value="0.2" /></label>
  116. <label>Max Tokens <input id="event-max-tokens" type="number" min="1" step="1" value="800" /></label>
  117. <label>System Prompt <textarea id="event-system-prompt" rows="5" placeholder="Optional EventAgent system prompt"></textarea></label>
  118. <label>Max Loops <input id="max-event-loops" type="number" min="1" step="1" value="1" /></label>
  119. <fieldset>
  120. <legend>Extra Body</legend>
  121. <label class="checkbox"><input id="event-thinking-disabled" type="checkbox" checked /> Disable thinking</label>
  122. <label class="checkbox"><input id="event-enable-search" type="checkbox" /> Enable search</label>
  123. <label class="checkbox"><input id="event-forced-search" type="checkbox" /> Forced search</label>
  124. </fieldset>
  125. </section>
  126. </form>
  127. </dialog>
  128. <template id="pre-message-template">
  129. <div class="pre-message">
  130. <select class="pre-role">
  131. <option value="user">user</option>
  132. <option value="assistant">assistant</option>
  133. <option value="system">system</option>
  134. </select>
  135. <textarea class="pre-content" rows="3"></textarea>
  136. </div>
  137. </template>
  138. <script src="/static/app.js"></script>
  139. </body>
  140. </html>