mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Use absolute path for imports
This commit is contained in:
parent
ec11114fdc
commit
5d1085ce55
6 changed files with 13 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react';
|
||||
import { ChatMessage, SharedState } from '../sharedState';
|
||||
import { ChatMessage, SharedState } from 'src/sharedState';
|
||||
import axios from 'axios';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import { WorkspaceLeaf, ItemView } from 'obsidian';
|
||||
import { SharedState } from '../sharedState';
|
||||
import { SharedState } from 'src/sharedState';
|
||||
import * as React from 'react';
|
||||
import Chat from '../components/Chat';
|
||||
import Chat from 'src/components/Chat';
|
||||
import { createRoot, Root } from 'react-dom/client';
|
||||
import { AppContext } from '../context';
|
||||
import { CHAT_VIEWTYPE } from '../constants';
|
||||
import { AppContext } from 'src/context';
|
||||
import { CHAT_VIEWTYPE } from 'src/constants';
|
||||
import CopilotPlugin, {CopilotSettings} from 'src/main';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react';
|
||||
import { App } from 'obsidian';
|
||||
import { SharedState } from './sharedState';
|
||||
import { SharedState } from 'src/sharedState';
|
||||
|
||||
// App context
|
||||
export const AppContext = React.createContext<App | undefined>(undefined);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import * as React from 'react';
|
||||
import { App } from 'obsidian';
|
||||
import { AppContext, SharedStateContext } from './context';
|
||||
import { SharedState } from './sharedState';
|
||||
import { AppContext, SharedStateContext } from 'src/context';
|
||||
import { SharedState } from 'src/sharedState';
|
||||
|
||||
// Custom hook to use the App context
|
||||
export const useApp = (): App | undefined => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Plugin, WorkspaceLeaf } from 'obsidian';
|
||||
import { CopilotSettingTab } from './settings';
|
||||
import { SharedState } from './sharedState';
|
||||
import CopilotView from './components/CopilotView';
|
||||
import { CHAT_VIEWTYPE } from './constants';
|
||||
import { CopilotSettingTab } from 'src/settings';
|
||||
import { SharedState } from 'src/sharedState';
|
||||
import CopilotView from 'src/components/CopilotView';
|
||||
import { CHAT_VIEWTYPE } from 'src/constants';
|
||||
|
||||
|
||||
export interface CopilotSettings {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import CopilotPlugin from "./main";
|
||||
import CopilotPlugin from "src/main";
|
||||
import { App, PluginSettingTab, Setting, DropdownComponent } from "obsidian";
|
||||
|
||||
export class CopilotSettingTab extends PluginSettingTab {
|
||||
|
|
|
|||
Loading…
Reference in a new issue