mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
IJPL-161819 introduce InlinePromptManager in intellij.platform.analysis
GitOrigin-RevId: 7b5d5315ac6a2961fa8d2dc7193e4b20010b17c9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
948f07932b
commit
ae087838b1
@@ -1,3 +1,8 @@
|
||||
*:com.intellij.ai.InlinePromptManager
|
||||
- *sf:Companion:com.intellij.ai.InlinePromptManager$Companion
|
||||
- a:isInlinePromptShown(com.intellij.openapi.editor.Editor):Z
|
||||
*f:com.intellij.ai.InlinePromptManager$Companion
|
||||
- f:getInstance(com.intellij.openapi.project.Project):com.intellij.ai.InlinePromptManager
|
||||
f:com.intellij.analysis.AnalysisBundle
|
||||
- sf:BUNDLE:java.lang.String
|
||||
- s:message(java.lang.String,java.lang.Object[]):java.lang.String
|
||||
@@ -168,6 +173,7 @@ com.intellij.codeInsight.completion.BatchConsumer
|
||||
- startBatch():V
|
||||
a:com.intellij.codeInsight.completion.CompletionConfidence
|
||||
- <init>():V
|
||||
- shouldSkipAutopopup(com.intellij.openapi.editor.Editor,com.intellij.psi.PsiElement,com.intellij.psi.PsiFile,I):com.intellij.util.ThreeState
|
||||
- shouldSkipAutopopup(com.intellij.psi.PsiElement,com.intellij.psi.PsiFile,I):com.intellij.util.ThreeState
|
||||
f:com.intellij.codeInsight.completion.CompletionConfidenceEP
|
||||
- com.intellij.lang.LanguageExtensionPoint
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ai
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.annotations.ApiStatus.Experimental
|
||||
|
||||
/**
|
||||
* Manages the inline prompts shown in editors.
|
||||
* An inline prompt is a piece of natural language text written right in the editor itself.
|
||||
* When we detect it, we start an inline prompt editing mode.
|
||||
* When we edit inline prompt, programming language features should not interfere with the prompt
|
||||
*/
|
||||
@Experimental
|
||||
interface InlinePromptManager {
|
||||
companion object {
|
||||
fun getInstance(project: Project): InlinePromptManager = project.getService(InlinePromptManager::class.java)
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the inline prompt is currently shown in the specified editor.
|
||||
*
|
||||
* @param editor the editor in which the inline prompt visibility is to be checked
|
||||
* @return true if the inline prompt is shown, false otherwise
|
||||
*/
|
||||
fun isInlinePromptShown(editor: Editor): Boolean
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.ai
|
||||
|
||||
import com.intellij.openapi.editor.Editor
|
||||
|
||||
internal class EmptyInlinePromptManager : InlinePromptManager {
|
||||
override fun isInlinePromptShown(editor: Editor): Boolean = false
|
||||
}
|
||||
@@ -363,6 +363,9 @@
|
||||
<applicationService serviceInterface="com.intellij.openapi.module.ModuleTypeManager"
|
||||
serviceImplementation="com.intellij.openapi.module.impl.ModuleTypeManagerImpl"/>
|
||||
|
||||
<projectService serviceInterface="com.intellij.ai.InlinePromptManager"
|
||||
serviceImplementation="com.intellij.ai.EmptyInlinePromptManager"/>
|
||||
|
||||
<applicationService
|
||||
serviceImplementation="com.intellij.openapi.roots.ui.configuration.actions.ModuleDeleteProvider"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user