folder structure refactor

This commit is contained in:
samtiz 2025-07-12 20:11:20 +09:00
parent 1bdc5fd1bd
commit 9eee95221e
85 changed files with 31 additions and 31 deletions

View File

@ -14,8 +14,8 @@ const baseConfig = {
};
const entryPoints = [
{ in: 'src/app/HeaderController.js', out: 'public/build/header' },
{ in: 'src/app/PickleGlassApp.js', out: 'public/build/content' },
{ in: 'src/ui/app/HeaderController.js', out: 'public/build/header' },
{ in: 'src/ui/app/PickleGlassApp.js', out: 'public/build/content' },
];
async function build() {

View File

@ -1,6 +1,6 @@
// src/bridge/windowBridge.js
const { ipcMain, BrowserWindow } = require('electron');
const { windowPool, settingsHideTimer, app, shell } = require('../electron/windowManager'); // 필요 변수 require
const { windowPool, settingsHideTimer, app, shell } = require('../window/windowManager'); // 필요 변수 require
module.exports = {
// Renderer로부터의 요청을 수신

View File

@ -1,6 +1,6 @@
const { ipcMain, BrowserWindow } = require('electron');
const { createStreamingLLM } = require('../../common/ai/factory');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo, windowPool, captureScreenshot } = require('../../electron/windowManager');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo, windowPool, captureScreenshot } = require('../../window/windowManager');
const authService = require('../../common/services/authService');
const sessionRepository = require('../../common/repositories/session');
const askRepository = require('./repositories');

View File

@ -1,7 +1,7 @@
const { BrowserWindow } = require('electron');
const { spawn } = require('child_process');
const { createSTT } = require('../../../common/ai/factory');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo } = require('../../../electron/windowManager');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo } = require('../../../window/windowManager');
const COMPLETION_DEBOUNCE_MS = 2000;

View File

@ -4,7 +4,7 @@ const { createLLM } = require('../../../common/ai/factory');
const authService = require('../../../common/services/authService');
const sessionRepository = require('../../../common/repositories/session');
const summaryRepository = require('./repositories');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo } = require('../../../electron/windowManager');
const { getStoredApiKey, getStoredProvider, getCurrentModelInfo } = require('../../../window/windowManager.js');
class SummaryService {
constructor() {

View File

@ -2,7 +2,7 @@ const { ipcMain, BrowserWindow } = require('electron');
const Store = require('electron-store');
const authService = require('../../common/services/authService');
const settingsRepository = require('./repositories');
const { getStoredApiKey, getStoredProvider, windowPool } = require('../../electron/windowManager');
const { getStoredApiKey, getStoredProvider, windowPool } = require('../../window/windowManager');
const store = new Store({
name: 'pickle-glass-settings',

View File

@ -12,7 +12,7 @@ if (require('electron-squirrel-startup')) {
}
const { app, BrowserWindow, shell, ipcMain, dialog, desktopCapturer, session } = require('electron');
const { createWindows } = require('./electron/windowManager.js');
const { createWindows } = require('./window/windowManager.js');
const ListenService = require('./features/listen/listenService');
const { initializeFirebase } = require('./common/services/firebaseClient');
const databaseInitializer = require('./common/services/databaseInitializer');
@ -124,7 +124,7 @@ function setupProtocolHandling() {
}
function focusMainWindow() {
const { windowPool } = require('./electron/windowManager');
const { windowPool } = require('./window/windowManager.js');
if (windowPool) {
const header = windowPool.get('header');
if (header && !header.isDestroyed()) {
@ -790,7 +790,7 @@ async function handleCustomUrl(url) {
handlePersonalizeFromUrl(params);
break;
default:
const { windowPool } = require('./electron/windowManager');
const { windowPool } = require('./window/windowManager.js');
const header = windowPool.get('header');
if (header) {
if (header.isMinimized()) header.restore();
@ -852,7 +852,7 @@ async function handleFirebaseAuthCallback(params) {
console.log('[Auth] Main process sign-in initiated. Waiting for onAuthStateChanged...');
// 3. Focus the app window
const { windowPool } = require('./electron/windowManager');
const { windowPool } = require('./window/windowManager.js');
const header = windowPool.get('header');
if (header) {
if (header.isMinimized()) header.restore();
@ -865,7 +865,7 @@ async function handleFirebaseAuthCallback(params) {
console.error('[Auth] Error during custom token exchange or sign-in:', error);
// The UI will not change, and the user can try again.
// Optionally, send a generic error event to the renderer.
const { windowPool } = require('./electron/windowManager');
const { windowPool } = require('./window/windowManager.js');
const header = windowPool.get('header');
if (header) {
header.webContents.send('auth-failed', { message: error.message });
@ -876,7 +876,7 @@ async function handleFirebaseAuthCallback(params) {
function handlePersonalizeFromUrl(params) {
console.log('[Custom URL] Personalize params:', params);
const { windowPool } = require('./electron/windowManager');
const { windowPool } = require('./window/windowManager.js');
const header = windowPool.get('header');
if (header) {

View File

@ -1,10 +1,10 @@
import { html, css, LitElement } from '../assets/lit-core-2.7.4.min.js';
import { SettingsView } from '../features/settings/SettingsView.js';
import { AssistantView } from '../features/listen/AssistantView.js';
import { AskView } from '../features/ask/AskView.js';
import { ShortcutSettingsView } from '../features/settings/ShortCutSettingsView.js';
import { SettingsView } from '../settings/SettingsView.js';
import { ListenView } from '../listen/ListenView.js';
import { AskView } from '../../features/ask/AskView.js';
import { ShortcutSettingsView } from '../../features/settings/ShortCutSettingsView.js';
import '../features/listen/renderer/renderer.js';
import '../listen/audioCore/renderer.js';
export class PickleGlassApp extends LitElement {
static styles = css`
@ -17,7 +17,7 @@ export class PickleGlassApp extends LitElement {
border-radius: 7px;
}
assistant-view {
listen-view {
display: block;
width: 100%;
height: 100%;
@ -172,12 +172,12 @@ export class PickleGlassApp extends LitElement {
render() {
switch (this.currentView) {
case 'listen':
return html`<assistant-view
return html`<listen-view
.currentResponseIndex=${this.currentResponseIndex}
.selectedProfile=${this.selectedProfile}
.structuredData=${this.structuredData}
@response-index-changed=${e => (this.currentResponseIndex = e.detail.index)}
></assistant-view>`;
></listen-view>`;
case 'ask':
return html`<ask-view></ask-view>`;
case 'settings':

View File

@ -1,4 +1,4 @@
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../../ui/assets/lit-core-2.7.4.min.js';
export class AskView extends LitElement {
static properties = {
@ -898,7 +898,7 @@ export class AskView extends LitElement {
if (container) this.resizeObserver.observe(container);
this.handleQuestionFromAssistant = (event, question) => {
console.log('📨 AskView: Received question from AssistantView:', question);
console.log('📨 AskView: Received question from ListenView:', question);
this.currentResponse = '';
this.isStreaming = false;
this.requestUpdate();

View File

Before

Width:  |  Height:  |  Size: 877 B

After

Width:  |  Height:  |  Size: 877 B

View File

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1,8 +1,8 @@
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../assets/lit-core-2.7.4.min.js';
import './stt/SttView.js';
import './summary/SummaryView.js';
export class AssistantView extends LitElement {
export class ListenView extends LitElement {
static styles = css`
:host {
display: block;
@ -689,4 +689,4 @@ export class AssistantView extends LitElement {
}
}
customElements.define('assistant-view', AssistantView);
customElements.define('listen-view', ListenView);

View File

@ -1,5 +1,5 @@
const { ipcRenderer } = require('electron');
const createAecModule = require('../../../assets/aec.js');
const createAecModule = require('./aec.js');
let aecModPromise = null; // 한 번만 로드
let aecMod = null;

View File

@ -1,4 +1,4 @@
import { html, css, LitElement } from '../../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
export class SttView extends LitElement {
static styles = css`

View File

@ -1,4 +1,4 @@
import { html, css, LitElement } from '../../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
export class SummaryView extends LitElement {
static styles = css`

View File

@ -1,4 +1,4 @@
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../assets/lit-core-2.7.4.min.js';
import { getOllamaProgressTracker } from '../../common/services/localProgressTracker.js';
export class SettingsView extends LitElement {

View File

@ -1,4 +1,4 @@
import { html, css, LitElement } from '../../assets/lit-core-2.7.4.min.js';
import { html, css, LitElement } from '../../ui/assets/lit-core-2.7.4.min.js';
const commonSystemShortcuts = new Set([
'Cmd+Q', 'Cmd+W', 'Cmd+A', 'Cmd+S', 'Cmd+Z', 'Cmd+X', 'Cmd+C', 'Cmd+V', 'Cmd+P', 'Cmd+F', 'Cmd+G', 'Cmd+H', 'Cmd+M', 'Cmd+N', 'Cmd+O', 'Cmd+T',