feat: AI assistant (MVP) - chat button per user, sees the workspace, streams answers, runs suggested commands in the active terminal; Gradio, OpenAI and Anthropic models set in Настройки
This commit is contained in:
1 parent
9572a35ad5
commit
46948f5ddc
9 files changed
+811
No files matched your search
@@ -116,6 +116,26 @@
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="card" id="ai">
|
||||
<h2>ИИ-ассистент</h2>
|
||||
<p class="muted">Чат в правом нижнем углу панели: видит вкладки и активный терминал, предлагает команды, которые
|
||||
пользователь выполняет одним нажатием. Каждый включает его себе сам в профиле. Ключ хранится на сервере
|
||||
и в браузер не уходит.</p>
|
||||
<form method="post" action="/settings/ai" class="ai-form">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
<label>Тип API<select name="ai_type">
|
||||
<option value="gradio"{{if eq .AI.Type "gradio"}} selected{{end}}>Gradio (Qwen Omni через прокси)</option>
|
||||
<option value="openai"{{if eq .AI.Type "openai"}} selected{{end}}>OpenAI-совместимый</option>
|
||||
<option value="anthropic"{{if eq .AI.Type "anthropic"}} selected{{end}}>Anthropic</option>
|
||||
</select></label>
|
||||
<label>Адрес<input type="url" name="ai_url" value="{{.AI.URL}}" placeholder="https://api.openai.com/v1"></label>
|
||||
<label>Модель<input type="text" name="ai_model" value="{{.AI.Model}}" placeholder="для OpenAI и Anthropic"></label>
|
||||
<label>Ключ<input type="password" name="ai_key" placeholder="{{if .AI.Key}}задан - пусто, чтобы оставить{{else}}не задан{{end}}" autocomplete="off"></label>
|
||||
{{if .AI.Key}}<label class="row" style="gap:8px"><input type="checkbox" name="ai_key_clear" value="1" style="width:auto"> убрать ключ</label>{{end}}
|
||||
<button type="submit">Сохранить</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Enroll-секрет</h2>
|
||||
<p class="muted">Общий секрет для регистрации новых агентов.</p>
|
||||
|
||||
Reference in new issue
Block a user