Skip to content

Commit 6207793

Browse files
committed
[DCV-3662] Fix linter issues
1 parent 0b9e05b commit 6207793

4 files changed

Lines changed: 1 addition & 60 deletions

File tree

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { MAX_IMAGES_PER_MESSAGE } from "./ChatView"
3131
import ContextMenu from "./ContextMenu"
3232
import { IndexingStatusBadge } from "./IndexingStatusBadge"
3333
import { usePromptHistory } from "./hooks/usePromptHistory"
34-
import { CloudAccountSwitcher } from "../cloud/CloudAccountSwitcher"
3534

3635
interface ChatTextAreaProps {
3736
inputValue: string

webview-ui/src/components/chat/ChatView.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import { useDeepCompareEffect, useEvent } from "react-use"
33
import debounce from "debounce"
44
import { Virtuoso, type VirtuosoHandle } from "react-virtuoso"
55
import removeMd from "remove-markdown"
6-
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
76
import useSound from "use-sound"
87
import { LRUCache } from "lru-cache"
9-
import { Trans } from "react-i18next"
108

119
import { useDebounceEffect } from "@src/utils/useDebounceEffect"
1210
import { appendImages } from "@src/utils/imageUtils"
@@ -31,7 +29,6 @@ import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel"
3129
import RooHero from "@src/components/welcome/RooHero"
3230
import RooTips from "@src/components/welcome/RooTips"
3331
import { StandardTooltip, Button } from "@src/components/ui"
34-
import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog"
3532

3633
import TelemetryBanner from "../common/TelemetryBanner"
3734
import VersionIndicator from "../common/VersionIndicator"
@@ -46,9 +43,6 @@ import SystemPromptWarning from "./SystemPromptWarning"
4643
import ProfileViolationWarning from "./ProfileViolationWarning"
4744
import { CheckpointWarning } from "./CheckpointWarning"
4845
import { QueuedMessages } from "./QueuedMessages"
49-
import DismissibleUpsell from "../common/DismissibleUpsell"
50-
import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
51-
import { Cloud } from "lucide-react"
5246

5347
export interface ChatViewProps {
5448
isHidden: boolean
@@ -93,7 +87,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
9387
hasSystemPromptOverride,
9488
soundEnabled,
9589
soundVolume,
96-
cloudIsAuthenticated,
9790
messageQueue = [],
9891
isBrowserSessionActive,
9992
} = useExtensionState()
@@ -174,15 +167,6 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
174167
clineAskRef.current = clineAsk
175168
}, [clineAsk])
176169

177-
const {
178-
isOpen: isUpsellOpen,
179-
openUpsell,
180-
closeUpsell,
181-
handleConnect,
182-
} = useCloudUpsell({
183-
autoOpenOnAuth: false,
184-
})
185-
186170
// Keep inputValueRef in sync with inputValue state
187171
useEffect(() => {
188172
inputValueRef.current = inputValue

webview-ui/src/components/chat/ShareButton.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { vscode } from "@/utils/vscode"
88
import { telemetryClient } from "@/utils/TelemetryClient"
99
import { useExtensionState } from "@/context/ExtensionStateContext"
1010
import { useCloudUpsell } from "@/hooks/useCloudUpsell"
11-
import { CloudUpsellDialog } from "@/components/cloud/CloudUpsellDialog"
1211
import {
1312
Popover,
1413
PopoverContent,
@@ -35,10 +34,7 @@ export const ShareButton = ({ item, disabled = false }: ShareButtonProps) => {
3534

3635
// Use enhanced cloud upsell hook with auto-open on auth success
3736
const {
38-
isOpen: connectModalOpen,
3937
openUpsell,
40-
closeUpsell,
41-
handleConnect,
4238
isAuthenticated: cloudIsAuthenticated,
4339
sharingEnabled,
4440
publicSharingEnabled,
@@ -97,12 +93,6 @@ export const ShareButton = ({ item, disabled = false }: ShareButtonProps) => {
9793
// Don't close the dropdown immediately - let success message show first
9894
}
9995

100-
const handleConnectToCloud = () => {
101-
setWasConnectInitiatedFromShare(true)
102-
handleConnect()
103-
setShareDropdownOpen(false)
104-
}
105-
10696
const handleShareButtonClick = () => {
10797
// Send telemetry for share button click
10898
telemetryClient.capture(TelemetryEventName.SHARE_BUTTON_CLICKED)

webview-ui/src/components/chat/TaskHeader.tsx

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
import { memo, useEffect, useRef, useState, useMemo } from "react"
1+
import { memo, useRef, useState, useMemo } from "react"
22
import { useTranslation } from "react-i18next"
3-
import { useCloudUpsell } from "@src/hooks/useCloudUpsell"
4-
import { CloudUpsellDialog } from "@src/components/cloud/CloudUpsellDialog"
5-
import DismissibleUpsell from "@src/components/common/DismissibleUpsell"
63
import {
74
ChevronUp,
85
ChevronDown,
@@ -18,7 +15,6 @@ import prettyBytes from "pretty-bytes"
1815
import type { ClineMessage } from "@roo-code/types"
1916

2017
import { getModelMaxOutputTokens } from "@roo/api"
21-
import { findLastIndex } from "@roo/array"
2218

2319
import { formatLargeNumber } from "@src/utils/format"
2420
import { cn } from "@src/lib/utils"
@@ -64,34 +60,6 @@ const TaskHeader = ({
6460
const { apiConfiguration, currentTaskItem, clineMessages, isBrowserSessionActive } = useExtensionState()
6561
const { id: modelId, info: model } = useSelectedModel(apiConfiguration)
6662
const [isTaskExpanded, setIsTaskExpanded] = useState(false)
67-
const [showLongRunningTaskMessage, setShowLongRunningTaskMessage] = useState(false)
68-
const { isOpen, openUpsell, closeUpsell, handleConnect } = useCloudUpsell({
69-
autoOpenOnAuth: false,
70-
})
71-
72-
// Check if the task is complete by looking at the last relevant message (skipping resume messages)
73-
const isTaskComplete =
74-
clineMessages && clineMessages.length > 0
75-
? (() => {
76-
const lastRelevantIndex = findLastIndex(
77-
clineMessages,
78-
(m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task"),
79-
)
80-
return lastRelevantIndex !== -1
81-
? clineMessages[lastRelevantIndex]?.ask === "completion_result"
82-
: false
83-
})()
84-
: false
85-
86-
useEffect(() => {
87-
const timer = setTimeout(() => {
88-
if (currentTaskItem && !isTaskComplete) {
89-
setShowLongRunningTaskMessage(true)
90-
}
91-
}, 120_000) // Show upsell after 2 minutes
92-
93-
return () => clearTimeout(timer)
94-
}, [currentTaskItem, isTaskComplete])
9563

9664
const textContainerRef = useRef<HTMLDivElement>(null)
9765
const textRef = useRef<HTMLDivElement>(null)

0 commit comments

Comments
 (0)