delete legacy code
This commit is contained in:
parent
c948d4ed08
commit
27f6f0e68e
@ -217,18 +217,6 @@ class ListenService {
|
||||
setupIpcHandlers() {
|
||||
const { ipcMain } = require('electron');
|
||||
|
||||
ipcMain.handle('is-session-active', async () => {
|
||||
const isActive = this.isSessionActive();
|
||||
console.log(`Checking session status. Active: ${isActive}`);
|
||||
return isActive;
|
||||
});
|
||||
|
||||
ipcMain.handle('initialize-openai', async (event, profile = 'interview', language = 'en') => {
|
||||
console.log(`Received initialize-openai request with profile: ${profile}, language: ${language}`);
|
||||
const success = await this.initializeSession(language);
|
||||
return success;
|
||||
});
|
||||
|
||||
ipcMain.handle('send-audio-content', async (event, { data, mimeType }) => {
|
||||
try {
|
||||
await this.sendAudioContent(data, mimeType);
|
||||
@ -280,10 +268,6 @@ class ListenService {
|
||||
}
|
||||
});
|
||||
|
||||
// ipcMain.handle('close-session', async () => {
|
||||
// return await this.closeSession();
|
||||
// });
|
||||
|
||||
ipcMain.handle('update-google-search-setting', async (event, enabled) => {
|
||||
try {
|
||||
console.log('Google Search setting updated to:', enabled);
|
||||
|
@ -80,10 +80,6 @@ export class PickleGlassApp extends LitElement {
|
||||
ipcRenderer.on('click-through-toggled', (_, isEnabled) => {
|
||||
this._isClickThrough = isEnabled;
|
||||
});
|
||||
// ipcRenderer.on('start-listening-session', () => {
|
||||
// console.log('Received start-listening-session command, calling handleListenClick.');
|
||||
// this.handleListenClick();
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,15 +88,10 @@ export class PickleGlassApp extends LitElement {
|
||||
if (window.require) {
|
||||
const { ipcRenderer } = window.require('electron');
|
||||
ipcRenderer.removeAllListeners('click-through-toggled');
|
||||
// ipcRenderer.removeAllListeners('start-listening-session');
|
||||
}
|
||||
}
|
||||
|
||||
updated(changedProperties) {
|
||||
// if (changedProperties.has('isMainViewVisible') || changedProperties.has('currentView')) {
|
||||
// this.requestWindowResize();
|
||||
// }
|
||||
|
||||
if (changedProperties.has('currentView')) {
|
||||
const viewContainer = this.shadowRoot?.querySelector('.view-container');
|
||||
if (viewContainer) {
|
||||
@ -129,36 +120,6 @@ export class PickleGlassApp extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// async handleListenClick() {
|
||||
// if (window.require) {
|
||||
// const { ipcRenderer } = window.require('electron');
|
||||
// const isActive = await ipcRenderer.invoke('is-session-active');
|
||||
// // if (isActive) {
|
||||
// // console.log('Session is already active. No action needed.');
|
||||
// // return;
|
||||
// // }
|
||||
// }
|
||||
|
||||
// if (window.pickleGlass) {
|
||||
// // await window.pickleGlass.initializeopenai(this.selectedProfile, this.selectedLanguage);
|
||||
// window.pickleGlass.startCapture(this.selectedScreenshotInterval, this.selectedImageQuality);
|
||||
// }
|
||||
|
||||
// // 🔄 Clear previous summary/analysis when a new listening session begins
|
||||
// this.structuredData = {
|
||||
// summary: [],
|
||||
// topic: { header: '', bullets: [] },
|
||||
// actions: [],
|
||||
// followUps: [],
|
||||
// };
|
||||
|
||||
// this.currentResponseIndex = -1;
|
||||
// this.startTime = Date.now();
|
||||
// this.currentView = 'listen';
|
||||
// this.isMainViewVisible = true;
|
||||
// }
|
||||
|
||||
async handleClose() {
|
||||
if (window.require) {
|
||||
const { ipcRenderer } = window.require('electron');
|
||||
|
Loading…
x
Reference in New Issue
Block a user