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
6 changes: 6 additions & 0 deletions .linear.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Linear CLI configuration for Pinecone Explorer
# https://github.com/schpet/linear-cli

workspace = "pinecone-explorer"
team_id = "PINE"
issue_sort = "priority"
23 changes: 23 additions & 0 deletions electron/connection-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,29 @@ export class ConnectionStore {

return result
}

/**
* Get the preferred explorer mode for a profile
*/
getPreferredMode(profileId: string): 'index' | 'assistant' | null {
const profile = this.getProfile(profileId)
return profile?.preferredMode ?? null
}

/**
* Set the preferred explorer mode for a profile
*/
setPreferredMode(profileId: string, mode: 'index' | 'assistant'): void {
const profiles = this.getProfiles()
const profile = profiles.find((p) => p.id === profileId)

if (!profile) {
throw new Error(`Profile not found: ${profileId}`)
}

profile.preferredMode = mode
getStore().set('profiles', profiles)
}
}

export const connectionStore = new ConnectionStore()
20 changes: 20 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,26 @@ ipcMain.handle('profiles:clearHybridEmbeddingOverride', async (_event, profileId
}
})

ipcMain.handle('profiles:getPreferredMode', async (_event, profileId: string) => {
try {
const mode = connectionStore.getPreferredMode(profileId)
return { success: true, data: mode }
} catch (error) {
const message = error instanceof Error ? error.message : 'Failed to get preferred mode'
return { success: false, error: message }
}
})

ipcMain.handle('profiles:setPreferredMode', async (_event, profileId: string, mode: 'index' | 'assistant') => {
try {
connectionStore.setPreferredMode(profileId, mode)
return { success: true }
} catch (error) {
const message = error instanceof Error ? error.message : 'Failed to set preferred mode'
return { success: false, error: message }
}
})

// ============================================================================
// Window Management IPC Handlers
// ============================================================================
Expand Down
13 changes: 13 additions & 0 deletions electron/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@ contextBridge.exposeInMainWorld('electronAPI', {
throw new Error(result.error)
}
},
getPreferredMode: async (profileId: string): Promise<'index' | 'assistant' | null> => {
const result = await ipcRenderer.invoke('profiles:getPreferredMode', profileId)
if (!result.success) {
throw new Error(result.error)
}
return result.data
},
setPreferredMode: async (profileId: string, mode: 'index' | 'assistant'): Promise<void> => {
const result = await ipcRenderer.invoke('profiles:setPreferredMode', profileId, mode)
if (!result.success) {
throw new Error(result.error)
}
},
},
window: {
createConnection: async (profile: ConnectionProfile): Promise<{ windowId: string }> => {
Expand Down
8 changes: 8 additions & 0 deletions electron/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ export interface HybridEmbeddingConfig {
defaultAlpha?: number // Default alpha for queries (0.5 if not set)
}

/**
* Explorer mode type - Index Explorer or Assistant Explorer
*/
export type ExplorerMode = 'index' | 'assistant'

/**
* Connection profile for Pinecone
*/
Expand All @@ -75,6 +80,9 @@ export interface ConnectionProfile {
// Per-index text field overrides (metadata field containing text for embedding)
// Default is '_text' if not specified
textFieldOverrides?: Record<string, string>

// Preferred explorer mode (index or assistant)
preferredMode?: ExplorerMode
}

/**
Expand Down
Loading