EOB
This commit is contained in:
@@ -97,16 +97,20 @@ export default class AiControlPopupExtension extends Extension {
|
||||
}
|
||||
|
||||
_position(win) {
|
||||
const [bx] = this._button.get_transformed_position();
|
||||
const [bx, by] = this._button.get_transformed_position();
|
||||
const bw = this._button.width;
|
||||
const bh = this._button.height;
|
||||
const rect = win.get_frame_rect();
|
||||
const wa = Main.layoutManager.getWorkAreaForMonitor(Main.layoutManager.primaryIndex);
|
||||
const mon = Main.layoutManager.primaryMonitor;
|
||||
let x = Math.round(bx + bw - rect.width);
|
||||
if (x < wa.x) x = wa.x;
|
||||
// Höhe auf die Arbeitsfläche klemmen, sonst schiebt der Compositor ein zu
|
||||
if (x < mon.x) x = mon.x;
|
||||
// Anker ist die Button-Unterkante, nicht die Work-Area: eine auto-versteckte
|
||||
// Leiste (hidetopbar) reserviert keine Struts, deren Work-Area-y wäre immer 0.
|
||||
const y = Math.round(by + bh);
|
||||
// Höhe an der Monitor-Unterkante klemmen, sonst schiebt der Compositor ein zu
|
||||
// hohes Fenster nach oben aus dem Sichtbereich (oberer Teil verschwindet).
|
||||
const h = Math.min(rect.height, wa.height);
|
||||
win.move_resize_frame(true, x, wa.y, rect.width, h);
|
||||
const h = Math.min(rect.height, mon.y + mon.height - y);
|
||||
win.move_resize_frame(true, x, y, rect.width, h);
|
||||
}
|
||||
|
||||
_placeBeforeRedraw(actor, w) {
|
||||
|
||||
@@ -19,3 +19,7 @@ Nicht für normale Chat-Antworten, kurze Bestätigungen oder Code im laufenden D
|
||||
1. `write_panel` mit dem vollständigen Entwurf als Argument `text` aufrufen (Markdown-Rohtext, das Panel rendert ihn). Das Panel blendet sich beim Schreiben automatisch ein.
|
||||
2. Den Text **nicht** zusätzlich als Fließtext in den Chat schreiben — im Chat nur kurz bestätigen (z. B. „Entwurf im Panel.").
|
||||
3. Ist das Tool nicht verfügbar (Terminal außerhalb von ai-control), den Text normal im Chat ausgeben.
|
||||
|
||||
## Panel leer öffnen
|
||||
|
||||
Soll das Panel ohne konkreten Inhalt geöffnet werden („mach das Panel auf", „Panel öffnen"), `write_panel` mit dem neutralen Platzhalter `Panel` aufrufen — leerer Text blendet das Panel nicht ein. Keinen erklärenden, werbenden oder ausgedachten Einleitungstext erfinden.
|
||||
|
||||
@@ -2344,8 +2344,6 @@ fn serve_popup_dbus(app: tauri::AppHandle) -> zbus::Result<()> {
|
||||
|
||||
/// Haupt-App: reine Tray-App ohne Dock-Eintrag.
|
||||
fn main_builder() -> tauri::Builder<tauri::Wry> {
|
||||
use tauri::Manager;
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_autostart::init(
|
||||
tauri_plugin_autostart::MacosLauncher::LaunchAgent,
|
||||
@@ -2417,6 +2415,7 @@ fn main_builder() -> tauri::Builder<tauri::Wry> {
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
{
|
||||
use tauri::tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent};
|
||||
use tauri::Manager;
|
||||
#[cfg(target_os = "macos")]
|
||||
let icon = tauri::image::Image::from_bytes(include_bytes!("../icons/trayTemplate.png"))?;
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
|
||||
@@ -170,7 +170,8 @@ pub fn build_window(
|
||||
|
||||
/// Startet die PTY für das rufende Fenster: das konfigurierte Claude-Kommando
|
||||
/// (settings.json: claudeCommand, Default claude) im Projektordner, mit dem
|
||||
/// Pool-Verzeichnis als CLAUDE_CONFIG_DIR. zsh -i lädt die .zshrc (PATH, fnm).
|
||||
/// Pool-Verzeichnis als CLAUDE_CONFIG_DIR. Die Login-Shell aus $SHELL (-l)
|
||||
/// baut den PATH aus ihren Profil-Dateien auf — shell-agnostisch.
|
||||
#[tauri::command]
|
||||
pub fn term_start(
|
||||
window: tauri::WebviewWindow,
|
||||
@@ -195,8 +196,9 @@ pub fn term_start(
|
||||
}
|
||||
let _ = std::fs::write(&panel_path, "");
|
||||
|
||||
let mut cmd = CommandBuilder::new("/bin/zsh");
|
||||
cmd.args(["-ic", &crate::claude_command(&paths)]);
|
||||
let shell = std::env::var("SHELL").unwrap_or_else(|_| "/bin/sh".into());
|
||||
let mut cmd = CommandBuilder::new(&shell);
|
||||
cmd.args(["-lc", &crate::claude_command(&paths)]);
|
||||
cmd.cwd(&cwd);
|
||||
cmd.env("TERM", "xterm-256color");
|
||||
cmd.env("AI_CONTROL_PANEL", &panel_path);
|
||||
|
||||
Reference in New Issue
Block a user