@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
23 lines • 814 B
JavaScript
import { createContext, useContext } from 'react';
import { getTitleShape as getTitleShapeFromPrefs, updateTitleShape as updateTitleShapeInPrefs, } from '../config/preferences.js';
export const TitleShapeContext = createContext(null);
export function useTitleShape() {
const context = useContext(TitleShapeContext);
if (!context) {
throw new Error('useTitleShape must be used within a TitleShapeProvider');
}
return context;
}
/**
* Helper function to get initial title shape from preferences
*/
export function getInitialTitleShape() {
return getTitleShapeFromPrefs() || 'pill';
}
/**
* Helper function to update title shape in both context and preferences
*/
export function updateTitleShape(shape) {
updateTitleShapeInPrefs(shape);
}
//# sourceMappingURL=useTitleShape.js.map