@sunub/obsidian-mcp-server 0.3.4 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/config.d.ts +2 -27
- package/build/config.js +11 -31
- package/build/config.js.map +1 -1
- package/build/db.js +3 -0
- package/build/db.js.map +1 -1
- package/build/index.js +28 -6
- package/build/index.js.map +1 -1
- package/build/server.js +16 -13
- package/build/server.js.map +1 -1
- package/build/setup.d.ts +4 -0
- package/build/setup.js +114 -0
- package/build/setup.js.map +1 -0
- package/build/tools/create_document_with_properties/index.d.ts +5 -5
- package/build/tools/create_document_with_properties/index.js +2 -2
- package/build/tools/create_document_with_properties/index.js.map +1 -1
- package/build/tools/create_document_with_properties/params.d.ts +8 -8
- package/build/tools/create_document_with_properties/params.js +1 -1
- package/build/tools/create_document_with_properties/params.js.map +1 -1
- package/build/tools/generate_property/index.d.ts +1 -1
- package/build/tools/generate_property/index.js +1 -1
- package/build/tools/generate_property/index.js.map +1 -1
- package/build/tools/generate_property/params.d.ts +4 -4
- package/build/tools/index.d.ts +8 -8
- package/build/tools/index.js +5 -5
- package/build/tools/index.js.map +1 -1
- package/build/tools/organize_attachments/index.d.ts +1 -1
- package/build/tools/organize_attachments/index.js +2 -2
- package/build/tools/organize_attachments/index.js.map +1 -1
- package/build/tools/vault/index.d.ts +2 -2
- package/build/tools/vault/index.js +7 -8
- package/build/tools/vault/index.js.map +1 -1
- package/build/tools/vault/params.d.ts +4 -4
- package/build/tools/vault/types/collect_context.d.ts +58 -58
- package/build/tools/vault/types/collect_context.js +1 -1
- package/build/tools/vault/types/collect_context.js.map +1 -1
- package/build/tools/vault/types/list_all.d.ts +42 -42
- package/build/tools/vault/types/list_all.js +2 -2
- package/build/tools/vault/types/list_all.js.map +1 -1
- package/build/tools/vault/types/read_specific.d.ts +6 -6
- package/build/tools/vault/types/read_specific.js +1 -1
- package/build/tools/vault/types/read_specific.js.map +1 -1
- package/build/tools/vault/types/search.d.ts +70 -70
- package/build/tools/vault/utils/actions/collect_context.d.ts +1 -1
- package/build/tools/vault/utils/actions/collect_context.js +4 -4
- package/build/tools/vault/utils/actions/collect_context.js.map +1 -1
- package/build/tools/vault/utils/actions/list_all.d.ts +1 -1
- package/build/tools/vault/utils/actions/list_all.js +1 -1
- package/build/tools/vault/utils/actions/list_all.js.map +1 -1
- package/build/tools/vault/utils/actions/load_memory.d.ts +1 -1
- package/build/tools/vault/utils/actions/load_memory.js +3 -3
- package/build/tools/vault/utils/actions/load_memory.js.map +1 -1
- package/build/tools/vault/utils/actions/read.d.ts +1 -1
- package/build/tools/vault/utils/actions/read.js +1 -1
- package/build/tools/vault/utils/actions/read.js.map +1 -1
- package/build/tools/vault/utils/actions/search.d.ts +1 -1
- package/build/tools/vault/utils/actions/search.js +25 -15
- package/build/tools/vault/utils/actions/search.js.map +1 -1
- package/build/tools/vault/utils/shared.d.ts +1 -1
- package/build/tools/vault/utils.d.ts +7 -8
- package/build/tools/vault/utils.js +7 -8
- package/build/tools/vault/utils.js.map +1 -1
- package/build/tools/write_property/index.d.ts +5 -5
- package/build/tools/write_property/index.js +1 -1
- package/build/tools/write_property/index.js.map +1 -1
- package/build/tools/write_property/params.d.ts +8 -8
- package/build/utils/DirectoryWalker.d.ts +1 -1
- package/build/utils/Embedder.d.ts +11 -0
- package/build/utils/Embedder.js +46 -0
- package/build/utils/Embedder.js.map +1 -0
- package/build/utils/Indexer.d.ts +4 -2
- package/build/utils/Indexer.js +19 -2
- package/build/utils/Indexer.js.map +1 -1
- package/build/utils/LLMClient.js +16 -0
- package/build/utils/LLMClient.js.map +1 -1
- package/build/utils/LocalReranker.d.ts +17 -0
- package/build/utils/LocalReranker.js +71 -0
- package/build/utils/LocalReranker.js.map +1 -0
- package/build/utils/RAGIndexer.d.ts +10 -1
- package/build/utils/RAGIndexer.js +59 -27
- package/build/utils/RAGIndexer.js.map +1 -1
- package/build/utils/RerankerClient.d.ts +6 -6
- package/build/utils/RerankerClient.js +20 -1
- package/build/utils/RerankerClient.js.map +1 -1
- package/build/utils/VaultManger/VaultManager.d.ts +38 -2
- package/build/utils/VaultManger/VaultManager.js +268 -13
- package/build/utils/VaultManger/VaultManager.js.map +1 -1
- package/build/utils/VaultManger/index.d.ts +3 -3
- package/build/utils/VaultManger/index.js +2 -2
- package/build/utils/VaultManger/index.js.map +1 -1
- package/build/utils/VaultManger/types.d.ts +1 -1
- package/build/utils/VaultWatcher.d.ts +1 -1
- package/build/utils/VaultWatcher.js +12 -55
- package/build/utils/VaultWatcher.js.map +1 -1
- package/build/utils/VectorDB.js +31 -6
- package/build/utils/VectorDB.js.map +1 -1
- package/build/utils/constants.d.ts +3 -0
- package/build/utils/constants.js +14 -0
- package/build/utils/constants.js.map +1 -0
- package/build/utils/getVaultManager.d.ts +1 -1
- package/build/utils/getVaultManager.js +1 -1
- package/build/utils/getVaultManager.js.map +1 -1
- package/build/utils/processor/MatterParser.d.ts +1 -1
- package/build/utils/processor/MatterParser.js +1 -1
- package/build/utils/processor/MatterParser.js.map +1 -1
- package/build/utils/processor/types.d.ts +4 -0
- package/build/utils/processor/types.js +1 -0
- package/build/utils/processor/types.js.map +1 -1
- package/package.json +16 -49
- package/LICENSE +0 -15
- package/README.md +0 -512
- package/build/cli/AppContainer.d.ts +0 -1
- package/build/cli/AppContainer.js +0 -197
- package/build/cli/AppContainer.js.map +0 -1
- package/build/cli/app.d.ts +0 -1
- package/build/cli/app.js +0 -7
- package/build/cli/app.js.map +0 -1
- package/build/cli/colors.d.ts +0 -15
- package/build/cli/colors.js +0 -15
- package/build/cli/colors.js.map +0 -1
- package/build/cli/commands/types.d.ts +0 -19
- package/build/cli/commands/types.js +0 -11
- package/build/cli/commands/types.js.map +0 -1
- package/build/cli/config/SettingContext.d.ts +0 -1
- package/build/cli/config/SettingContext.js +0 -2
- package/build/cli/config/SettingContext.js.map +0 -1
- package/build/cli/config/mcpServersConfig.d.ts +0 -30
- package/build/cli/config/mcpServersConfig.js +0 -119
- package/build/cli/config/mcpServersConfig.js.map +0 -1
- package/build/cli/config/settingSchema.d.ts +0 -180
- package/build/cli/config/settingSchema.js +0 -128
- package/build/cli/config/settingSchema.js.map +0 -1
- package/build/cli/constants.d.ts +0 -47
- package/build/cli/constants.js +0 -101
- package/build/cli/constants.js.map +0 -1
- package/build/cli/context/InputContext.d.ts +0 -12
- package/build/cli/context/InputContext.js +0 -10
- package/build/cli/context/InputContext.js.map +0 -1
- package/build/cli/context/KeypressContext.d.ts +0 -30
- package/build/cli/context/KeypressContext.js +0 -200
- package/build/cli/context/KeypressContext.js.map +0 -1
- package/build/cli/context/KeypressContext.util.d.ts +0 -7
- package/build/cli/context/KeypressContext.util.js +0 -474
- package/build/cli/context/KeypressContext.util.js.map +0 -1
- package/build/cli/hooks/useAtCompletion.d.ts +0 -12
- package/build/cli/hooks/useAtCompletion.js +0 -5
- package/build/cli/hooks/useAtCompletion.js.map +0 -1
- package/build/cli/hooks/useCommandCompletion.d.ts +0 -59
- package/build/cli/hooks/useCommandCompletion.js +0 -344
- package/build/cli/hooks/useCommandCompletion.js.map +0 -1
- package/build/cli/hooks/useCompletion.d.ts +0 -22
- package/build/cli/hooks/useCompletion.js +0 -84
- package/build/cli/hooks/useCompletion.js.map +0 -1
- package/build/cli/hooks/useDispatcher.d.ts +0 -6
- package/build/cli/hooks/useDispatcher.js +0 -286
- package/build/cli/hooks/useDispatcher.js.map +0 -1
- package/build/cli/hooks/useFocus.d.ts +0 -2
- package/build/cli/hooks/useFocus.js +0 -3
- package/build/cli/hooks/useFocus.js.map +0 -1
- package/build/cli/hooks/useInputHistory.d.ts +0 -24
- package/build/cli/hooks/useInputHistory.js +0 -159
- package/build/cli/hooks/useInputHistory.js.map +0 -1
- package/build/cli/hooks/useKeyMatchers.d.ts +0 -17
- package/build/cli/hooks/useKeyMatchers.js +0 -13
- package/build/cli/hooks/useKeyMatchers.js.map +0 -1
- package/build/cli/hooks/useKeypress.d.ts +0 -19
- package/build/cli/hooks/useKeypress.js +0 -28
- package/build/cli/hooks/useKeypress.js.map +0 -1
- package/build/cli/hooks/useLlmStream.d.ts +0 -12
- package/build/cli/hooks/useLlmStream.js +0 -365
- package/build/cli/hooks/useLlmStream.js.map +0 -1
- package/build/cli/hooks/useMcpClient.d.ts +0 -10
- package/build/cli/hooks/useMcpClient.js +0 -100
- package/build/cli/hooks/useMcpClient.js.map +0 -1
- package/build/cli/hooks/useMcpManager.d.ts +0 -22
- package/build/cli/hooks/useMcpManager.js +0 -86
- package/build/cli/hooks/useMcpManager.js.map +0 -1
- package/build/cli/hooks/usePromptCompletion.d.ts +0 -19
- package/build/cli/hooks/usePromptCompletion.js +0 -13
- package/build/cli/hooks/usePromptCompletion.js.map +0 -1
- package/build/cli/hooks/useRagContext.d.ts +0 -6
- package/build/cli/hooks/useRagContext.js +0 -83
- package/build/cli/hooks/useRagContext.js.map +0 -1
- package/build/cli/hooks/useShellCompletion.d.ts +0 -18
- package/build/cli/hooks/useShellCompletion.js +0 -10
- package/build/cli/hooks/useShellCompletion.js.map +0 -1
- package/build/cli/hooks/useSlashCompletion.d.ts +0 -21
- package/build/cli/hooks/useSlashCompletion.js +0 -11
- package/build/cli/hooks/useSlashCompletion.js.map +0 -1
- package/build/cli/hooks/useTerminalSize.d.ts +0 -9
- package/build/cli/hooks/useTerminalSize.js +0 -26
- package/build/cli/hooks/useTerminalSize.js.map +0 -1
- package/build/cli/index.d.ts +0 -1
- package/build/cli/index.js +0 -39
- package/build/cli/index.js.map +0 -1
- package/build/cli/key/input.d.ts +0 -5
- package/build/cli/key/input.js +0 -9
- package/build/cli/key/input.js.map +0 -1
- package/build/cli/key/keyBindings.d.ts +0 -152
- package/build/cli/key/keyBindings.js +0 -630
- package/build/cli/key/keyBindings.js.map +0 -1
- package/build/cli/key/keyMatchers.d.ts +0 -27
- package/build/cli/key/keyMatchers.js +0 -33
- package/build/cli/key/keyMatchers.js.map +0 -1
- package/build/cli/key/mouse.d.ts +0 -23
- package/build/cli/key/mouse.js +0 -155
- package/build/cli/key/mouse.js.map +0 -1
- package/build/cli/key/text-buffer-bestcase.d.ts +0 -867
- package/build/cli/key/text-buffer-bestcase.js +0 -2754
- package/build/cli/key/text-buffer-bestcase.js.map +0 -1
- package/build/cli/key/text-buffer.d.ts +0 -509
- package/build/cli/key/text-buffer.js +0 -918
- package/build/cli/key/text-buffer.js.map +0 -1
- package/build/cli/main.d.ts +0 -1
- package/build/cli/main.js +0 -20
- package/build/cli/main.js.map +0 -1
- package/build/cli/reference/HistoryItemDisplay.d.ts +0 -23
- package/build/cli/reference/HistoryItemDisplay.js +0 -63
- package/build/cli/reference/HistoryItemDisplay.js.map +0 -1
- package/build/cli/reference/InputContext.d.ts +0 -17
- package/build/cli/reference/InputContext.js +0 -16
- package/build/cli/reference/InputContext.js.map +0 -1
- package/build/cli/reference/KerypressContext.d.ts +0 -37
- package/build/cli/reference/KerypressContext.js +0 -791
- package/build/cli/reference/KerypressContext.js.map +0 -1
- package/build/cli/reference/MainContent.d.ts +0 -6
- package/build/cli/reference/MainContent.js +0 -207
- package/build/cli/reference/MainContent.js.map +0 -1
- package/build/cli/reference/UIStateContext.d.ts +0 -188
- package/build/cli/reference/UIStateContext.js +0 -16
- package/build/cli/reference/UIStateContext.js.map +0 -1
- package/build/cli/reference/text-buffer.d.ts +0 -867
- package/build/cli/reference/text-buffer.js +0 -2754
- package/build/cli/reference/text-buffer.js.map +0 -1
- package/build/cli/reference/useGeminiStream.d.ts +0 -42
- package/build/cli/reference/useGeminiStream.js +0 -1404
- package/build/cli/reference/useGeminiStream.js.map +0 -1
- package/build/cli/services/McpClientService.d.ts +0 -32
- package/build/cli/services/McpClientService.js +0 -123
- package/build/cli/services/McpClientService.js.map +0 -1
- package/build/cli/services/McpManager.d.ts +0 -28
- package/build/cli/services/McpManager.js +0 -146
- package/build/cli/services/McpManager.js.map +0 -1
- package/build/cli/theme/builtin/default-dark.d.ts +0 -7
- package/build/cli/theme/builtin/default-dark.js +0 -143
- package/build/cli/theme/builtin/default-dark.js.map +0 -1
- package/build/cli/theme/builtin/no-color.d.ts +0 -7
- package/build/cli/theme/builtin/no-color.js +0 -125
- package/build/cli/theme/builtin/no-color.js.map +0 -1
- package/build/cli/theme/builtin/tokyonight-dark.d.ts +0 -7
- package/build/cli/theme/builtin/tokyonight-dark.js +0 -146
- package/build/cli/theme/builtin/tokyonight-dark.js.map +0 -1
- package/build/cli/theme/semantic-colors.d.ts +0 -2
- package/build/cli/theme/semantic-colors.js +0 -19
- package/build/cli/theme/semantic-colors.js.map +0 -1
- package/build/cli/theme/semantic-tokens.d.ts +0 -42
- package/build/cli/theme/semantic-tokens.js +0 -77
- package/build/cli/theme/semantic-tokens.js.map +0 -1
- package/build/cli/theme/theme-manager.d.ts +0 -32
- package/build/cli/theme/theme-manager.js +0 -150
- package/build/cli/theme/theme-manager.js.map +0 -1
- package/build/cli/theme/theme.d.ts +0 -107
- package/build/cli/theme/theme.js +0 -333
- package/build/cli/theme/theme.js.map +0 -1
- package/build/cli/tmp.d.ts +0 -1
- package/build/cli/tmp.js +0 -27
- package/build/cli/tmp.js.map +0 -1
- package/build/cli/types.d.ts +0 -72
- package/build/cli/types.js +0 -8
- package/build/cli/types.js.map +0 -1
- package/build/cli/ui/ConnectionStatus.d.ts +0 -13
- package/build/cli/ui/ConnectionStatus.js +0 -24
- package/build/cli/ui/ConnectionStatus.js.map +0 -1
- package/build/cli/ui/HelpCommands.d.ts +0 -5
- package/build/cli/ui/HelpCommands.js +0 -11
- package/build/cli/ui/HelpCommands.js.map +0 -1
- package/build/cli/ui/HistoryItemDisplay.d.ts +0 -9
- package/build/cli/ui/HistoryItemDisplay.js +0 -38
- package/build/cli/ui/HistoryItemDisplay.js.map +0 -1
- package/build/cli/ui/InputPrompt-bestcase.d.ts +0 -63
- package/build/cli/ui/InputPrompt-bestcase.js +0 -1301
- package/build/cli/ui/InputPrompt-bestcase.js.map +0 -1
- package/build/cli/ui/InputPrompt.d.ts +0 -12
- package/build/cli/ui/InputPrompt.js +0 -145
- package/build/cli/ui/InputPrompt.js.map +0 -1
- package/build/cli/ui/InputPrompt.tmp.d.ts +0 -7
- package/build/cli/ui/InputPrompt.tmp.js +0 -215
- package/build/cli/ui/InputPrompt.tmp.js.map +0 -1
- package/build/cli/ui/MainContent.d.ts +0 -10
- package/build/cli/ui/MainContent.js +0 -24
- package/build/cli/ui/MainContent.js.map +0 -1
- package/build/cli/ui/MouseContext.d.ts +0 -1
- package/build/cli/ui/MouseContext.js +0 -2
- package/build/cli/ui/MouseContext.js.map +0 -1
- package/build/cli/ui/SuggestionsDisplay.d.ts +0 -25
- package/build/cli/ui/SuggestionsDisplay.js +0 -45
- package/build/cli/ui/SuggestionsDisplay.js.map +0 -1
- package/build/cli/ui/ThinkingIndicator.d.ts +0 -2
- package/build/cli/ui/ThinkingIndicator.js +0 -16
- package/build/cli/ui/ThinkingIndicator.js.map +0 -1
- package/build/cli/ui/layout/DefaultAppLayout.d.ts +0 -2
- package/build/cli/ui/layout/DefaultAppLayout.js +0 -6
- package/build/cli/ui/layout/DefaultAppLayout.js.map +0 -1
- package/build/cli/ui/shared/ExpandableText.d.ts +0 -14
- package/build/cli/ui/shared/ExpandableText.js +0 -19
- package/build/cli/ui/shared/ExpandableText.js.map +0 -1
- package/build/cli/utils/cache.d.ts +0 -21
- package/build/cli/utils/cache.js +0 -56
- package/build/cli/utils/cache.js.map +0 -1
- package/build/cli/utils/commandUtils.d.ts +0 -11
- package/build/cli/utils/commandUtils.js +0 -16
- package/build/cli/utils/commandUtils.js.map +0 -1
- package/build/cli/utils/debugLogger.d.ts +0 -12
- package/build/cli/utils/debugLogger.js +0 -54
- package/build/cli/utils/debugLogger.js.map +0 -1
- package/build/cli/utils/historyStorage.d.ts +0 -13
- package/build/cli/utils/historyStorage.js +0 -64
- package/build/cli/utils/historyStorage.js.map +0 -1
- package/build/cli/utils/textUtil.d.ts +0 -68
- package/build/cli/utils/textUtil.js +0 -236
- package/build/cli/utils/textUtil.js.map +0 -1
- package/build/tools/vault/utils/actions/search_semantic.d.ts +0 -3
- package/build/tools/vault/utils/actions/search_semantic.js +0 -71
- package/build/tools/vault/utils/actions/search_semantic.js.map +0 -1
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
export var MergeStrategy;
|
|
2
|
-
(function (MergeStrategy) {
|
|
3
|
-
MergeStrategy["SHALLOW_MERGE"] = "shallow_merge";
|
|
4
|
-
MergeStrategy["CONCAT"] = "concat";
|
|
5
|
-
MergeStrategy["UNION"] = "union";
|
|
6
|
-
MergeStrategy["REPLACE"] = "replace";
|
|
7
|
-
})(MergeStrategy || (MergeStrategy = {}));
|
|
8
|
-
export const SETTINGS_SCHEMA = {
|
|
9
|
-
// 1. Obsidian Vault 설정 (핵심)
|
|
10
|
-
obsidian: {
|
|
11
|
-
type: "object",
|
|
12
|
-
label: "Obsidian Vault",
|
|
13
|
-
category: "Obsidian",
|
|
14
|
-
requiresRestart: true,
|
|
15
|
-
default: {},
|
|
16
|
-
description: "Obsidian Vault 연동 및 데이터 관리 설정",
|
|
17
|
-
showInDialog: true,
|
|
18
|
-
properties: {
|
|
19
|
-
vaultPath: {
|
|
20
|
-
type: "string",
|
|
21
|
-
label: "Vault 절대 경로",
|
|
22
|
-
category: "Obsidian",
|
|
23
|
-
requiresRestart: true,
|
|
24
|
-
default: "",
|
|
25
|
-
description: "Obsidian Vault 디렉토리의 절대 경로 (VAULT_DIR_PATH)",
|
|
26
|
-
showInDialog: true,
|
|
27
|
-
},
|
|
28
|
-
loggingLevel: {
|
|
29
|
-
type: "enum",
|
|
30
|
-
label: "로그 레벨",
|
|
31
|
-
category: "Obsidian",
|
|
32
|
-
requiresRestart: false,
|
|
33
|
-
default: "info",
|
|
34
|
-
description: "서버 로그 기록 상세 수준",
|
|
35
|
-
showInDialog: true,
|
|
36
|
-
options: [
|
|
37
|
-
{ value: "debug", label: "Debug" },
|
|
38
|
-
{ value: "info", label: "Info" },
|
|
39
|
-
{ value: "warn", label: "Warn" },
|
|
40
|
-
{ value: "error", label: "Error" },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
metricsLogPath: {
|
|
44
|
-
type: "string",
|
|
45
|
-
label: "메트릭 로그 경로",
|
|
46
|
-
category: "Obsidian",
|
|
47
|
-
requiresRestart: false,
|
|
48
|
-
default: "",
|
|
49
|
-
description: "토큰 사용량 등 메트릭을 기록할 JSONL 파일 경로 (VAULT_METRICS_LOG_PATH)",
|
|
50
|
-
showInDialog: true,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
// 2. LLM & RAG 설정 (GEMINI.md 기준 필수)
|
|
55
|
-
llm: {
|
|
56
|
-
type: "object",
|
|
57
|
-
label: "LLM (Local RAG)",
|
|
58
|
-
category: "RAG",
|
|
59
|
-
requiresRestart: true,
|
|
60
|
-
default: {},
|
|
61
|
-
description: "로컬 AI 모델 연동 및 임베딩 설정",
|
|
62
|
-
showInDialog: true,
|
|
63
|
-
properties: {
|
|
64
|
-
apiUrl: {
|
|
65
|
-
type: "string",
|
|
66
|
-
label: "Chat API URL",
|
|
67
|
-
category: "RAG",
|
|
68
|
-
requiresRestart: true,
|
|
69
|
-
default: "http://127.0.0.1:8080",
|
|
70
|
-
description: "로컬 LLM 채팅 서버 주소 (LLM_API_URL)",
|
|
71
|
-
showInDialog: true,
|
|
72
|
-
},
|
|
73
|
-
embeddingApiUrl: {
|
|
74
|
-
type: "string",
|
|
75
|
-
label: "Embedding API URL",
|
|
76
|
-
category: "RAG",
|
|
77
|
-
requiresRestart: true,
|
|
78
|
-
default: "http://127.0.0.1:8081",
|
|
79
|
-
description: "로컬 임베딩 서버 주소 (LLM_EMBEDDING_API_URL)",
|
|
80
|
-
showInDialog: true,
|
|
81
|
-
},
|
|
82
|
-
embedModel: {
|
|
83
|
-
type: "string",
|
|
84
|
-
label: "임베딩 모델",
|
|
85
|
-
category: "RAG",
|
|
86
|
-
requiresRestart: true,
|
|
87
|
-
default: "nomic-embed-text",
|
|
88
|
-
description: "벡터화에 사용할 임베딩 모델명 (LLM_EMBEDDING_MODEL)",
|
|
89
|
-
showInDialog: true,
|
|
90
|
-
},
|
|
91
|
-
chatModel: {
|
|
92
|
-
type: "string",
|
|
93
|
-
label: "채팅 모델",
|
|
94
|
-
category: "RAG",
|
|
95
|
-
requiresRestart: true,
|
|
96
|
-
default: "llama3",
|
|
97
|
-
description: "답변 생성에 사용할 모델명 (LLM_CHAT_MODEL)",
|
|
98
|
-
showInDialog: true,
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
// 3. 일반 설정
|
|
103
|
-
general: {
|
|
104
|
-
type: "object",
|
|
105
|
-
label: "일반 설정",
|
|
106
|
-
category: "General",
|
|
107
|
-
requiresRestart: false,
|
|
108
|
-
default: {},
|
|
109
|
-
description: "일반적인 애플리케이션 설정",
|
|
110
|
-
showInDialog: true,
|
|
111
|
-
properties: {
|
|
112
|
-
defaultApprovalMode: {
|
|
113
|
-
type: "enum",
|
|
114
|
-
label: "도구 승인 모드",
|
|
115
|
-
category: "General",
|
|
116
|
-
requiresRestart: false,
|
|
117
|
-
default: "default",
|
|
118
|
-
description: "도구 실행 시 승인 절차를 제어합니다.",
|
|
119
|
-
showInDialog: true,
|
|
120
|
-
options: [
|
|
121
|
-
{ value: "default", label: "승인 필요" },
|
|
122
|
-
{ value: "auto_edit", label: "자동 수정 허용" },
|
|
123
|
-
],
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
//# sourceMappingURL=settingSchema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settingSchema.js","sourceRoot":"","sources":["../../../src/cli/config/settingSchema.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,oCAAmB,CAAA;AACpB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AA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AK,EAAE,UAAU;gBACjB,QAAQ,EAAE,SAAS;gBACnB,eAAe,EAAE,KAAK;gBACtB,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,uBAAuB;gBACpC,YAAY,EAAE,IAAI;gBAClB,OAAO,EAAE;oBACR,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE;oBACpC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE;iBACzC;aACD;SACD;KACD;CACiC,CAAC"}
|
package/build/cli/constants.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export declare const SHELL_COMMAND_NAME = "Shell Command";
|
|
7
|
-
export declare const SHELL_NAME = "Shell";
|
|
8
|
-
export declare const MAX_GEMINI_MESSAGE_LINES = 65536;
|
|
9
|
-
export declare const SHELL_FOCUS_HINT_DELAY_MS = 5000;
|
|
10
|
-
export declare const TOOL_STATUS: {
|
|
11
|
-
readonly SUCCESS: "✓";
|
|
12
|
-
readonly PENDING: "o";
|
|
13
|
-
readonly EXECUTING: "⊷";
|
|
14
|
-
readonly CONFIRMING: "?";
|
|
15
|
-
readonly CANCELED: "-";
|
|
16
|
-
readonly ERROR: "x";
|
|
17
|
-
};
|
|
18
|
-
export declare const MAX_MCP_RESOURCES_TO_SHOW = 10;
|
|
19
|
-
export declare const WARNING_PROMPT_DURATION_MS = 3000;
|
|
20
|
-
export declare const QUEUE_ERROR_DISPLAY_DURATION_MS = 3000;
|
|
21
|
-
export declare const SHELL_ACTION_REQUIRED_TITLE_DELAY_MS = 30000;
|
|
22
|
-
export declare const SHELL_SILENT_WORKING_TITLE_DELAY_MS = 120000;
|
|
23
|
-
export declare const EXPAND_HINT_DURATION_MS = 5000;
|
|
24
|
-
export declare const DEFAULT_BACKGROUND_OPACITY = 0.16;
|
|
25
|
-
export declare const DEFAULT_INPUT_BACKGROUND_OPACITY = 0.24;
|
|
26
|
-
export declare const DEFAULT_SELECTION_OPACITY = 0.2;
|
|
27
|
-
export declare const DEFAULT_BORDER_OPACITY = 0.4;
|
|
28
|
-
export declare const KEYBOARD_SHORTCUTS_URL = "https://geminicli.com/docs/cli/keyboard-shortcuts/";
|
|
29
|
-
export declare const LRU_BUFFER_PERF_CACHE_LIMIT = 20000;
|
|
30
|
-
export declare const ACTIVE_SHELL_MAX_LINES = 15;
|
|
31
|
-
export declare const COMPLETED_SHELL_MAX_LINES = 15;
|
|
32
|
-
export declare const SUBAGENT_MAX_LINES = 15;
|
|
33
|
-
/** Minimum terminal width required to show the full context used label */
|
|
34
|
-
export declare const MIN_TERMINAL_WIDTH_FOR_FULL_LABEL = 100;
|
|
35
|
-
/** Default context usage fraction at which to trigger compression */
|
|
36
|
-
export declare const DEFAULT_COMPRESSION_THRESHOLD = 0.5;
|
|
37
|
-
/** Documentation URL for skills setup and configuration */
|
|
38
|
-
export declare const SKILLS_DOCS_URL = "https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md";
|
|
39
|
-
/** Max lines to show for a compact tool subview (e.g. diff) */
|
|
40
|
-
export declare const COMPACT_TOOL_SUBVIEW_MAX_LINES = 15;
|
|
41
|
-
export declare const MAX_SHELL_OUTPUT_SIZE = 10000000;
|
|
42
|
-
export declare const SHELL_OUTPUT_TRUNCATION_BUFFER = 1000000;
|
|
43
|
-
export declare const HELP_COMMAND_MARKER = "__HELP_COMMANDS__";
|
|
44
|
-
export declare const SLASH_COMMANDS: {
|
|
45
|
-
command: string;
|
|
46
|
-
desc: string;
|
|
47
|
-
}[];
|
package/build/cli/constants.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2025 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
export const SHELL_COMMAND_NAME = "Shell Command";
|
|
7
|
-
export const SHELL_NAME = "Shell";
|
|
8
|
-
// Limit Gemini messages to a very high number of lines to mitigate performance
|
|
9
|
-
// issues in the worst case if we somehow get an enormous response from Gemini.
|
|
10
|
-
// This threshold is arbitrary but should be high enough to never impact normal
|
|
11
|
-
// usage.
|
|
12
|
-
export const MAX_GEMINI_MESSAGE_LINES = 65536;
|
|
13
|
-
export const SHELL_FOCUS_HINT_DELAY_MS = 5000;
|
|
14
|
-
// Tool status symbols used in ToolMessage component
|
|
15
|
-
export const TOOL_STATUS = {
|
|
16
|
-
SUCCESS: "✓",
|
|
17
|
-
PENDING: "o",
|
|
18
|
-
EXECUTING: "⊷",
|
|
19
|
-
CONFIRMING: "?",
|
|
20
|
-
CANCELED: "-",
|
|
21
|
-
ERROR: "x",
|
|
22
|
-
};
|
|
23
|
-
// Maximum number of MCP resources to display per server before truncating
|
|
24
|
-
export const MAX_MCP_RESOURCES_TO_SHOW = 10;
|
|
25
|
-
export const WARNING_PROMPT_DURATION_MS = 3000;
|
|
26
|
-
export const QUEUE_ERROR_DISPLAY_DURATION_MS = 3000;
|
|
27
|
-
export const SHELL_ACTION_REQUIRED_TITLE_DELAY_MS = 30000;
|
|
28
|
-
export const SHELL_SILENT_WORKING_TITLE_DELAY_MS = 120000;
|
|
29
|
-
export const EXPAND_HINT_DURATION_MS = 5000;
|
|
30
|
-
export const DEFAULT_BACKGROUND_OPACITY = 0.16;
|
|
31
|
-
export const DEFAULT_INPUT_BACKGROUND_OPACITY = 0.24;
|
|
32
|
-
export const DEFAULT_SELECTION_OPACITY = 0.2;
|
|
33
|
-
export const DEFAULT_BORDER_OPACITY = 0.4;
|
|
34
|
-
export const KEYBOARD_SHORTCUTS_URL = "https://geminicli.com/docs/cli/keyboard-shortcuts/";
|
|
35
|
-
export const LRU_BUFFER_PERF_CACHE_LIMIT = 20000;
|
|
36
|
-
// Max lines to show for active shell output when not focused
|
|
37
|
-
export const ACTIVE_SHELL_MAX_LINES = 15;
|
|
38
|
-
// Max lines to preserve in history for completed shell commands
|
|
39
|
-
export const COMPLETED_SHELL_MAX_LINES = 15;
|
|
40
|
-
// Max lines to show for subagent results before collapsing
|
|
41
|
-
export const SUBAGENT_MAX_LINES = 15;
|
|
42
|
-
/** Minimum terminal width required to show the full context used label */
|
|
43
|
-
export const MIN_TERMINAL_WIDTH_FOR_FULL_LABEL = 100;
|
|
44
|
-
/** Default context usage fraction at which to trigger compression */
|
|
45
|
-
export const DEFAULT_COMPRESSION_THRESHOLD = 0.5;
|
|
46
|
-
/** Documentation URL for skills setup and configuration */
|
|
47
|
-
export const SKILLS_DOCS_URL = "https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/skills.md";
|
|
48
|
-
/** Max lines to show for a compact tool subview (e.g. diff) */
|
|
49
|
-
export const COMPACT_TOOL_SUBVIEW_MAX_LINES = 15;
|
|
50
|
-
// Maximum number of UTF-16 code units to retain in a background task's output
|
|
51
|
-
// buffer. Beyond this, the oldest output is dropped to keep memory bounded.
|
|
52
|
-
// 10 MB is large enough for ~200,000 lines of terminal output and stays well
|
|
53
|
-
// below the V8 string length limit (~1 GB) even with multiple concurrent tasks.
|
|
54
|
-
export const MAX_SHELL_OUTPUT_SIZE = 10_000_000; // 10 MB
|
|
55
|
-
// Truncation is triggered only once the output exceeds
|
|
56
|
-
// MAX_SHELL_OUTPUT_SIZE + SHELL_OUTPUT_TRUNCATION_BUFFER, then sliced back to
|
|
57
|
-
// MAX_SHELL_OUTPUT_SIZE. This avoids an O(n) string copy on every appended
|
|
58
|
-
// chunk, amortizing the cost to once per SHELL_OUTPUT_TRUNCATION_BUFFER bytes
|
|
59
|
-
// of new input (i.e. once per ~1 MB on a busy shell).
|
|
60
|
-
export const SHELL_OUTPUT_TRUNCATION_BUFFER = 1_000_000; // 1 MB
|
|
61
|
-
// --- Added for Help Commands Integration ---
|
|
62
|
-
export const HELP_COMMAND_MARKER = "__HELP_COMMANDS__";
|
|
63
|
-
export const SLASH_COMMANDS = [
|
|
64
|
-
{
|
|
65
|
-
command: "/search <keyword>",
|
|
66
|
-
desc: "Vault 키워드 검색",
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
command: '/read "filename"',
|
|
70
|
-
desc: "문서 읽기 (파일명에 따옴표 권장)",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
command: "/semantic <query>",
|
|
74
|
-
desc: "시맨틱(벡터) 검색",
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
command: "/stats",
|
|
78
|
-
desc: "Vault 상태 정보",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
command: "/index",
|
|
82
|
-
desc: "벡터 DB 인덱싱 실행",
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
command: "/context <topic>",
|
|
86
|
-
desc: "토픽 기반 컨텍스트 수집",
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
command: "/tools",
|
|
90
|
-
desc: "사용 가능한 MCP 도구 목록",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
command: "/clear",
|
|
94
|
-
desc: "대화 히스토리 초기화",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
command: "/help",
|
|
98
|
-
desc: "이 도움말 표시",
|
|
99
|
-
},
|
|
100
|
-
];
|
|
101
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/cli/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAElD,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC;AAElC,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,SAAS;AACT,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAE9C,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAE9C,o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AAE5E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAEjD,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,gFAAgF;AAChF,MAAM,CAAC,MAAM,qBAAqB,GAAG,UAAU,CAAC,CAAC,QAAQ;AAEzD,uDAAuD;AACvD,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,sDAAsD;AACtD,MAAM,CAAC,MAAM,8BAA8B,GAAG,SAAS,CAAC,CAAC,OAAO;AAEhE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAEvD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;QACC,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,cAAc;KACpB;IACD;QACC,OAAO,EAAE,kBAAkB;QAC3B,IAAI,EAAE,qBAAqB;KAC3B;IACD;QACC,OAAO,EAAE,mBAAmB;QAC5B,IAAI,EAAE,YAAY;KAClB;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,aAAa;KACnB;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,cAAc;KACpB;IACD;QACC,OAAO,EAAE,kBAAkB;QAC3B,IAAI,EAAE,eAAe;KACrB;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,kBAAkB;KACxB;IACD;QACC,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE,aAAa;KACnB;IACD;QACC,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,UAAU;KAChB;CACD,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TextBuffer } from "../key/text-buffer.js";
|
|
2
|
-
export interface InputState {
|
|
3
|
-
buffer: TextBuffer;
|
|
4
|
-
userMessages: string[];
|
|
5
|
-
shellModeActive: boolean;
|
|
6
|
-
showEscapePrompt: boolean;
|
|
7
|
-
copyModeEnabled: boolean | undefined;
|
|
8
|
-
inputWidth: number;
|
|
9
|
-
suggestionsWidth: number;
|
|
10
|
-
}
|
|
11
|
-
export declare const InputContext: import("react").Context<InputState | null>;
|
|
12
|
-
export declare const useInputState: () => InputState;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { createContext, useContext } from "react";
|
|
2
|
-
export const InputContext = createContext(null);
|
|
3
|
-
export const useInputState = () => {
|
|
4
|
-
const context = useContext(InputContext);
|
|
5
|
-
if (!context) {
|
|
6
|
-
throw new Error("useInputState must be used within an InputProvider");
|
|
7
|
-
}
|
|
8
|
-
return context;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=InputContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InputContext.js","sourceRoot":"","sources":["../../../src/cli/context/InputContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAalD,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAoB,IAAI,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type React from "react";
|
|
2
|
-
export declare const BACKSLASH_ENTER_TIMEOUT = 5;
|
|
3
|
-
export declare const ESC_TIMEOUT = 50;
|
|
4
|
-
export declare const PASTE_TIMEOUT = 30000;
|
|
5
|
-
export declare const FAST_RETURN_TIMEOUT = 30;
|
|
6
|
-
export declare enum KeypressPriority {
|
|
7
|
-
Low = -100,
|
|
8
|
-
Normal = 0,
|
|
9
|
-
High = 100,
|
|
10
|
-
Critical = 200
|
|
11
|
-
}
|
|
12
|
-
export interface Key {
|
|
13
|
-
name: string;
|
|
14
|
-
shift: boolean;
|
|
15
|
-
alt: boolean;
|
|
16
|
-
ctrl: boolean;
|
|
17
|
-
cmd: boolean;
|
|
18
|
-
insertable: boolean;
|
|
19
|
-
sequence: string;
|
|
20
|
-
}
|
|
21
|
-
interface KeypressContextValue {
|
|
22
|
-
subscribe: (handler: KeypressHandler, priority?: KeypressPriority | boolean) => void;
|
|
23
|
-
unsubscribe: (handler: KeypressHandler) => void;
|
|
24
|
-
}
|
|
25
|
-
export type KeypressHandler = (key: Key) => boolean | undefined;
|
|
26
|
-
export declare function KeypressProvider({ children }: {
|
|
27
|
-
children: React.ReactNode;
|
|
28
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export declare function useKeypressContext(): KeypressContextValue;
|
|
30
|
-
export {};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useStdin } from "ink";
|
|
3
|
-
import { MultiMap } from "mnemonist";
|
|
4
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, } from "react";
|
|
5
|
-
import { emitKeys, nonKeyboardEventFilter } from "./KeypressContext.util.js";
|
|
6
|
-
export const BACKSLASH_ENTER_TIMEOUT = 5;
|
|
7
|
-
export const ESC_TIMEOUT = 50;
|
|
8
|
-
export const PASTE_TIMEOUT = 30_000;
|
|
9
|
-
export const FAST_RETURN_TIMEOUT = 30;
|
|
10
|
-
export var KeypressPriority;
|
|
11
|
-
(function (KeypressPriority) {
|
|
12
|
-
KeypressPriority[KeypressPriority["Low"] = -100] = "Low";
|
|
13
|
-
KeypressPriority[KeypressPriority["Normal"] = 0] = "Normal";
|
|
14
|
-
KeypressPriority[KeypressPriority["High"] = 100] = "High";
|
|
15
|
-
KeypressPriority[KeypressPriority["Critical"] = 200] = "Critical";
|
|
16
|
-
})(KeypressPriority || (KeypressPriority = {}));
|
|
17
|
-
/**
|
|
18
|
-
* Buffers "/" keys to see if they are followed return.
|
|
19
|
-
* Will flush the buffer if no data is received for DRAG_COMPLETION_TIMEOUT_MS
|
|
20
|
-
* or when a null key is received.
|
|
21
|
-
*/
|
|
22
|
-
function bufferBackslashEnter(keypressHandler) {
|
|
23
|
-
const bufferer = (function* () {
|
|
24
|
-
while (true) {
|
|
25
|
-
const key = yield;
|
|
26
|
-
if (key == null) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
else if (key.sequence !== "\\") {
|
|
30
|
-
keypressHandler(key);
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const timeoutId = setTimeout(() => bufferer.next(null), BACKSLASH_ENTER_TIMEOUT);
|
|
34
|
-
const nextKey = yield;
|
|
35
|
-
clearTimeout(timeoutId);
|
|
36
|
-
if (nextKey === null) {
|
|
37
|
-
keypressHandler(key);
|
|
38
|
-
}
|
|
39
|
-
else if (nextKey.name === "enter") {
|
|
40
|
-
keypressHandler({
|
|
41
|
-
...nextKey,
|
|
42
|
-
shift: true,
|
|
43
|
-
sequence: "\r",
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
keypressHandler(key);
|
|
48
|
-
keypressHandler(nextKey);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
})();
|
|
52
|
-
bufferer.next(); // prime the generator so it starts listening.
|
|
53
|
-
return (key) => {
|
|
54
|
-
bufferer.next(key);
|
|
55
|
-
return undefined;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Buffers paste events between paste-start and paste-end sequences.
|
|
60
|
-
* Will flush the buffer if no data is received for PASTE_TIMEOUT ms or
|
|
61
|
-
* when a null key is received.
|
|
62
|
-
*/
|
|
63
|
-
function bufferPaste(keypressHandler) {
|
|
64
|
-
const bufferer = (function* () {
|
|
65
|
-
while (true) {
|
|
66
|
-
let key = yield;
|
|
67
|
-
if (key === null) {
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
else if (key.name !== "paste-start") {
|
|
71
|
-
keypressHandler(key);
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
let buffer = "";
|
|
75
|
-
while (true) {
|
|
76
|
-
const timeoutId = setTimeout(() => bufferer.next(null), PASTE_TIMEOUT);
|
|
77
|
-
key = yield;
|
|
78
|
-
clearTimeout(timeoutId);
|
|
79
|
-
if (key === null) {
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
if (key.name === "paste-end") {
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
buffer += key.sequence;
|
|
86
|
-
}
|
|
87
|
-
if (buffer.length > 0) {
|
|
88
|
-
keypressHandler({
|
|
89
|
-
name: "paste",
|
|
90
|
-
shift: false,
|
|
91
|
-
alt: false,
|
|
92
|
-
ctrl: false,
|
|
93
|
-
cmd: false,
|
|
94
|
-
insertable: true,
|
|
95
|
-
sequence: buffer,
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
})();
|
|
100
|
-
bufferer.next(); // prime the generator so it starts listening.
|
|
101
|
-
return (key) => {
|
|
102
|
-
bufferer.next(key);
|
|
103
|
-
return undefined;
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Turns raw data strings into keypress events sent to the provided handler.
|
|
108
|
-
* Buffers escape sequences until a full sequence is received or
|
|
109
|
-
* until a timeout occurs.
|
|
110
|
-
*/
|
|
111
|
-
function createDataListener(keypressHandler) {
|
|
112
|
-
const parser = emitKeys(keypressHandler);
|
|
113
|
-
parser.next(); // prime the generator so it starts listening.
|
|
114
|
-
let timeoutId;
|
|
115
|
-
return (data) => {
|
|
116
|
-
clearTimeout(timeoutId);
|
|
117
|
-
for (const char of data) {
|
|
118
|
-
parser.next(char);
|
|
119
|
-
}
|
|
120
|
-
if (data.length !== 0) {
|
|
121
|
-
timeoutId = setTimeout(() => parser.next(""), ESC_TIMEOUT);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
const KeypressContext = createContext(undefined);
|
|
126
|
-
export function KeypressProvider({ children }) {
|
|
127
|
-
const { stdin, setRawMode } = useStdin();
|
|
128
|
-
const subscribersToPriority = useRef(new Map()).current;
|
|
129
|
-
const subscribers = useRef(new MultiMap(Set)).current;
|
|
130
|
-
const sortedPriorities = useRef([]);
|
|
131
|
-
const subscribe = useCallback((handler, priority = KeypressPriority.Normal) => {
|
|
132
|
-
const p = typeof priority === "boolean"
|
|
133
|
-
? priority
|
|
134
|
-
? KeypressPriority.High
|
|
135
|
-
: KeypressPriority.Normal
|
|
136
|
-
: priority;
|
|
137
|
-
subscribersToPriority.set(handler, p);
|
|
138
|
-
const hadPriority = subscribers.has(p);
|
|
139
|
-
subscribers.set(p, handler);
|
|
140
|
-
if (!hadPriority) {
|
|
141
|
-
// Cache sorted priorities only when a new priority level is added
|
|
142
|
-
sortedPriorities.current = Array.from(subscribers.keys()).sort((a, b) => b - a);
|
|
143
|
-
}
|
|
144
|
-
}, [subscribers, subscribersToPriority]);
|
|
145
|
-
const unsubscribe = useCallback((handler) => {
|
|
146
|
-
const p = subscribersToPriority.get(handler);
|
|
147
|
-
if (p !== undefined) {
|
|
148
|
-
subscribers.remove(p, handler);
|
|
149
|
-
subscribersToPriority.delete(handler);
|
|
150
|
-
if (!subscribers.has(p)) {
|
|
151
|
-
// Cache sorted priorities only when a priority level is completely removed
|
|
152
|
-
sortedPriorities.current = Array.from(subscribers.keys()).sort((a, b) => b - a);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}, [subscribers, subscribersToPriority]);
|
|
156
|
-
const broadcast = useCallback((key) => {
|
|
157
|
-
// Use cached sorted priorities to avoid sorting on every keypress
|
|
158
|
-
for (const p of sortedPriorities.current) {
|
|
159
|
-
const set = subscribers.get(p);
|
|
160
|
-
if (!set)
|
|
161
|
-
continue;
|
|
162
|
-
// Within a priority level, use stack behavior (last subscribed is first to handle)
|
|
163
|
-
const handlers = Array.from(set).reverse();
|
|
164
|
-
for (const handler of handlers) {
|
|
165
|
-
if (handler(key) === true) {
|
|
166
|
-
return true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return false;
|
|
171
|
-
}, [subscribers]);
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
const wasRaw = stdin.isRaw;
|
|
174
|
-
if (wasRaw === false) {
|
|
175
|
-
setRawMode(true);
|
|
176
|
-
}
|
|
177
|
-
process.stdin.setEncoding("utf8");
|
|
178
|
-
let processor = nonKeyboardEventFilter(broadcast);
|
|
179
|
-
processor = bufferBackslashEnter(processor);
|
|
180
|
-
processor = bufferPaste(processor);
|
|
181
|
-
const dataListener = createDataListener(processor);
|
|
182
|
-
stdin.on("data", dataListener);
|
|
183
|
-
return () => {
|
|
184
|
-
stdin.removeListener("data", dataListener);
|
|
185
|
-
if (wasRaw === false) {
|
|
186
|
-
setRawMode(false);
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
}, [stdin, setRawMode, broadcast]);
|
|
190
|
-
const contextValue = useMemo(() => ({ subscribe, unsubscribe }), [subscribe, unsubscribe]);
|
|
191
|
-
return (_jsx(KeypressContext.Provider, { value: contextValue, children: children }));
|
|
192
|
-
}
|
|
193
|
-
export function useKeypressContext() {
|
|
194
|
-
const context = useContext(KeypressContext);
|
|
195
|
-
if (!context) {
|
|
196
|
-
throw new Error("useKeypressContext must be used within a KeypressProvider");
|
|
197
|
-
}
|
|
198
|
-
return context;
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=KeypressContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KeypressContext.js","sourceRoot":"","sources":["../../../src/cli/context/KeypressContext.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EACN,aAAa,EACb,WAAW,EACX,U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AAC;QAClD,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAC5C,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;QACnC,MAAM,YAAY,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAEnD,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC/B,OAAO,GAAG,EAAE;YACX,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;YAC3C,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;gBACtB,UAAU,CAAC,KAAK,CAAC,CAAC;YACnB,CAAC;QACF,CAAC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnC,MAAM,YAAY,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EAClC,CAAC,SAAS,EAAE,WAAW,CAAC,CACxB,CAAC;IAEF,OAAO,CACN,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAC3C,QAAQ,GACiB,CAC3B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACd,2DAA2D,CAC3D,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { KeypressHandler } from "./KeypressContext.js";
|
|
2
|
-
export declare const BACKSLASH_ENTER_TIMEOUT = 5;
|
|
3
|
-
export declare const ESC_TIMEOUT = 50;
|
|
4
|
-
export declare const PASTE_TIMEOUT = 30000;
|
|
5
|
-
export declare const FAST_RETURN_TIMEOUT = 30;
|
|
6
|
-
export declare function emitKeys(keypressHandler: KeypressHandler): Generator<void, void, string>;
|
|
7
|
-
export declare function nonKeyboardEventFilter(keypressHandler: KeypressHandler): KeypressHandler;
|