ide на основе vs code · VibeGit
ide на основе vs code Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
krutaya-ide-na-osnove-vs-code / src / vs / workbench / contrib / inlineChat / common / inlineChat.ts 122 строк · изменён 14 нояб., 04:52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { localize } from '../../../../nls.js' ;
import { MenuId } from '../../../../platform/actions/common/actions.js' ;
import { Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js' ;
import { ContextKeyExpr, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js' ;
import { Registry } from '../../../../platform/registry/common/platform.js' ;
import { diffInserted, diffRemoved, editorWidgetBackground, editorWidgetBorder, editorWidgetForeground, focusBorder, inputBackground, inputPlaceholderForeground, registerColor, transparent widgetShadow
InlineChatConfigKeys
NotebookAgent
DefaultModel
Affordance
FixDiagnostics
AskInChat
Registry Extensions Configuration
id
properties
InlineChatConfigKeys NotebookAgent
markdownDescription
type
tags
experiment
mode
InlineChatConfigKeys Affordance
description
type
enumDescriptions
experiment
mode
tags
agentsWindow
InlineChatConfigKeys FixDiagnostics
description
type
experiment
mode
tags
InlineChatConfigKeys AskInChat
description
type
ContextKeyExpr
ContextKeyExpr
ContextKeyExpr
ContextKeyExpr
MenuId
MenuId
inlineChatForeground editorWidgetForeground
inlineChatBackground editorWidgetBackground
inlineChatBorder editorWidgetBorder
inlineChatShadow widgetShadow
inlineChatInputBorder editorWidgetBorder
inlineChatInputFocusBorder focusBorder
inlineChatInputPlaceholderForeground inputPlaceholderForeground
inlineChatInputBackground inputBackground
inlineChatDiffInserted diffInserted
overviewRulerInlineChatDiffInserted dark diffInserted light diffInserted hcDark diffInserted hcLight diffInserted
minimapInlineChatDiffInserted dark diffInserted light diffInserted hcDark diffInserted hcLight diffInserted
inlineChatDiffRemoved diffRemoved
overviewRulerInlineChatDiffRemoved dark diffRemoved light diffRemoved hcDark diffRemoved hcLight diffRemoved
,
}
from
'../../../../platform/theme/common/colorRegistry.js'
;
import
{
NOTEBOOK_IS_ACTIVE_EDITOR
}
from
'../../notebook/common/notebookContextKeys.js'
;
export
const
enum
{
=
'inlineChat.notebookAgent'
,
=
'inlineChat.defaultModel'
,
=
'inlineChat.affordance'
,
=
'inlineChat.fixDiagnostics'
,
=
'inlineChat.askInChat'
,
}
.
as < IConfigurationRegistry>
(
.
)
.
registerConfiguration
(
{
:
'editor'
,
:
{
[
.
]
:
{
:
localize
(
'notebookAgent'
,
"Enable agent-like behavior for inline chat widget in notebooks."
)
,
default
:
false
,
:
'boolean'
,
:
[
'experimental'
]
,
:
{
:
'startup'
}
}
,
[
.
]
:
{
:
localize
(
'affordance'
,
"Controls whether an inline chat affordance is shown when text is selected."
)
,
default
:
'off'
,
:
'string'
,
enum
:
[
'off'
,
'editor'
]
,
:
[
localize
(
'affordance.off'
,
"No affordance is shown."
)
,
localize
(
'affordance.editor'
,
"Show an affordance in the editor at the cursor position."
)
,
]
,
:
{
:
'auto'
}
,
:
[
'experimental'
]
,
:
{
default
:
'editor'
}
,
}
,
[
.
]
:
{
:
localize
(
'fixDiagnostics'
,
"Controls whether the Fix action is shown for diagnostics in the editor."
)
,
default
:
true
,
:
'boolean'
,
:
{
:
'auto'
}
,
:
[
'experimental'
]
}
,
[
.
]
:
{
:
localize
(
'askInChat'
,
"Controls whether files in a chat editing session use Ask in Chat instead of Inline Chat."
)
,
default
:
true
,
:
'boolean'
,
}
,
}
}
)
;
export
const
INLINE_CHAT_ID
=
'editor.contrib.inlineChatController'
;
export
const
CTX_INLINE_CHAT_POSSIBLE
=
new
RawContextKey< boolean >
(
'inlineChatPossible'
,
false
,
localize
(
'inlineChatHasPossible'
,
"Whether a provider for inline chat exists and whether an editor for inline chat is open"
)
)
;
export
const
CTX_INLINE_CHAT_HAS_AGENT
=
new
RawContextKey< boolean >
(
'inlineChatHasEditsAgent'
,
false
,
localize
(
'inlineChatHasEditsAgent'
,
"Whether an agent for inline chat in interactive editors exists"
)
)
;
export
const
CTX_INLINE_CHAT_HAS_NOTEBOOK_INLINE
=
new
RawContextKey< boolean >
(
'inlineChatHasNotebookInline'
,
false
,
localize
(
'inlineChatHasNotebookInline'
,
"Whether an agent for notebook cells exists"
)
)
;
export
const
CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT
=
new
RawContextKey< boolean >
(
'inlineChatHasNotebookAgent'
,
false
,
localize
(
'inlineChatHasNotebookAgent'
,
"Whether an agent for notebook cells exists"
)
)
;
export
const
CTX_INLINE_CHAT_VISIBLE
=
new
RawContextKey< boolean >
(
'inlineChatVisible'
,
false
,
localize
(
'inlineChatVisible'
,
"Whether the interactive editor input is visible"
)
)
;
export
const
CTX_INLINE_CHAT_FOCUSED
=
new
RawContextKey< boolean >
(
'inlineChatFocused'
,
false
,
localize
(
'inlineChatFocused'
,
"Whether the interactive editor input is focused"
)
)
;
export
const
CTX_INLINE_CHAT_EDITING
=
new
RawContextKey< boolean >
(
'inlineChatEditing'
,
true
,
localize
(
'inlineChatEditing'
,
"Whether the user is currently editing or generating code in the inline chat"
)
)
;
export
const
CTX_INLINE_CHAT_RESPONSE_FOCUSED
=
new
RawContextKey< boolean >
(
'inlineChatResponseFocused'
,
false
,
localize
(
'inlineChatResponseFocused'
,
"Whether the interactive widget's response is focused"
)
)
;
export
const
CTX_INLINE_CHAT_EMPTY
=
new
RawContextKey< boolean >
(
'inlineChatEmpty'
,
false
,
localize
(
'inlineChatEmpty'
,
"Whether the interactive editor input is empty"
)
)
;
export
const
CTX_INLINE_CHAT_OUTER_CURSOR_POSITION
=
new
RawContextKey< 'above' | 'below' | '' >
(
'inlineChatOuterCursorPosition'
,
''
,
localize
(
'inlineChatOuterCursorPosition'
,
"Whether the cursor of the outer editor is above or below the interactive editor input"
)
)
;
export
const
CTX_INLINE_CHAT_REQUEST_IN_PROGRESS
=
new
RawContextKey< boolean >
(
'inlineChatRequestInProgress'
,
false
,
localize
(
'inlineChatRequestInProgress'
,
"Whether an inline chat request is currently in progress"
)
)
;
export
const
CTX_INLINE_CHAT_FILE_BELONGS_TO_CHAT
=
new
RawContextKey< boolean >
(
'inlineChatFileBelongsToChat'
,
false
,
localize
(
'inlineChatFileBelongsToChat'
,
"Whether the current file belongs to a chat editing session"
)
)
;
export
const
CTX_INLINE_CHAT_TERMINATED
=
new
RawContextKey< boolean >
(
'inlineChatTerminated'
,
false
,
localize
(
'inlineChatTerminated'
,
"Whether the current inline chat session is terminated"
)
)
;
export
const
CTX_INLINE_CHAT_AFFORDANCE_VISIBLE
=
new
RawContextKey< boolean >
(
'inlineChatAffordanceVisible'
,
false
,
localize
(
'inlineChatAffordanceVisible'
,
"Whether an inline chat affordance widget is visible"
)
)
;
export
const
CTX_INLINE_CHAT_V2_ENABLED
=
.
or
(
CTX_INLINE_CHAT_HAS_AGENT
,
.
and
(
NOTEBOOK_IS_ACTIVE_EDITOR
,
CTX_INLINE_CHAT_HAS_NOTEBOOK_AGENT
)
)
;
export
const
CTX_FIX_DIAGNOSTICS_ENABLED
=
.
equals
(
'config.inlineChat.fixDiagnostics'
,
true
)
;
export
const
CTX_ASK_IN_CHAT_ENABLED
=
.
equals
(
'config.inlineChat.askInChat'
,
true
)
;
export
const
ACTION_START
=
'inlineChat.start'
;
export
const
ACTION_ASK_IN_CHAT
=
'inlineChat.askInChat'
;
export
const
MENU_INLINE_CHAT_WIDGET_SECONDARY
=
.
for
(
'inlineChatWidget.secondary'
)
;
export
const
MENU_INLINE_CHAT_SIDE
=
.
for
(
'inlineChatWidget.side'
)
;
export
const
=
registerColor
(
'inlineChat.foreground'
,
,
localize
(
'inlineChat.foreground'
,
"Foreground color of the interactive editor widget"
)
)
;
export
const
=
registerColor
(
'inlineChat.background'
,
,
localize
(
'inlineChat.background'
,
"Background color of the interactive editor widget"
)
)
;
export
const
=
registerColor
(
'inlineChat.border'
,
,
localize
(
'inlineChat.border'
,
"Border color of the interactive editor widget"
)
)
;
export
const
=
registerColor
(
'inlineChat.shadow'
,
,
localize
(
'inlineChat.shadow'
,
"Shadow color of the interactive editor widget"
)
)
;
export
const
=
registerColor
(
'inlineChatInput.border'
,
,
localize
(
'inlineChatInput.border'
,
"Border color of the interactive editor input"
)
)
;
export
const
=
registerColor
(
'inlineChatInput.focusBorder'
,
,
localize
(
'inlineChatInput.focusBorder'
,
"Border color of the interactive editor input when focused"
)
)
;
export
const
=
registerColor
(
'inlineChatInput.placeholderForeground'
,
,
localize
(
'inlineChatInput.placeholderForeground'
,
"Foreground color of the interactive editor input placeholder"
)
)
;
export
const
=
registerColor
(
'inlineChatInput.background'
,
,
localize
(
'inlineChatInput.background'
,
"Background color of the interactive editor input"
)
)
;
export
const
=
registerColor
(
'inlineChatDiff.inserted'
,
transparent
(
,
.5
)
,
localize
(
'inlineChatDiff.inserted'
,
"Background color of inserted text in the interactive editor input"
)
)
;
export
const
=
registerColor
(
'editorOverviewRuler.inlineChatInserted'
,
{
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
,
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
}
,
localize
(
'editorOverviewRuler.inlineChatInserted'
,
'Overview ruler marker color for inline chat inserted content.'
)
)
;
export
const
=
registerColor
(
'editorMinimap.inlineChatInserted'
,
{
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
,
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
}
,
localize
(
'editorMinimap.inlineChatInserted'
,
'Minimap marker color for inline chat inserted content.'
)
)
;
export
const
=
registerColor
(
'inlineChatDiff.removed'
,
transparent
(
,
.5
)
,
localize
(
'inlineChatDiff.removed'
,
"Background color of removed text in the interactive editor input"
)
)
;
export
const
=
registerColor
(
'editorOverviewRuler.inlineChatRemoved'
,
{
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
,
:
transparent
(
,
0.6
)
,
:
transparent
(
,
0.8
)
}
,
localize
(
'editorOverviewRuler.inlineChatRemoved'
,
'Overview ruler marker color for inline chat removed content.'
)
)
;