Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,20 +168,15 @@ const CommonAgentAreaContent: FC<CommonAgentAreaProps> = ({ agentName }) => {
if (curConversationId !== conversationId) {
setCurConversationId(conversationId);
}
}, [setCurConversationId, curConversationId, conversationId]);

useEffect(() => {
if (inputValueFromLocation) {
sendMessage(inputValueFromLocation);
// Clear the state after using it once to prevent re-triggering on page refresh
navigate(".", { replace: true, state: {} });
}
}, [
sendMessage,
setCurConversationId,
curConversationId,
navigate,
conversationId,
inputValueFromLocation,
]);
}, [inputValueFromLocation, navigate, sendMessage]);

const [inputValue, setInputValue] = useState<string>("");
const { currentSection } = useMultiSection();
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/lib/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ interface TrackerConfig {
}

interface TrackingParams {
user_id: string;
client_id: string;
os: string;
[key: string]: unknown;
Expand All @@ -41,7 +40,6 @@ class Tracker {
constructor(config: TrackerConfig) {
this.config = config;
this.params = {
user_id: useSystemStore.getState().id,
client_id: "",
os: "",
};
Expand All @@ -60,7 +58,6 @@ class Tracker {
);

this.params = {
...this.params,
client_id: clientId,
os: systemInfo,
};
Expand All @@ -77,6 +74,7 @@ class Tracker {

const payload = {
event,
user_id: useSystemStore.getState().id,
...this.params,
...params,
};
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/store/plugin/tauri-store-state.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isTauri } from "@tauri-apps/api/core";
import { load, type Store } from "@tauri-apps/plugin-store";
import type { StateStorage } from "zustand/middleware";
import { debounce } from "@/hooks/use-debounce";
Expand All @@ -23,11 +24,7 @@ export class TauriStoreState implements StateStorage {
return;
}

const tauriInternals = (
window as Window & { __TAURI_INTERNALS__?: unknown }
).__TAURI_INTERNALS__;

if (!tauriInternals) {
if (!isTauri()) {
// Running in a regular browser; fall back to default persist storage.
return;
}
Expand Down