mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-21 04:41:16 -05:00
Merge pull request #676 from RooVetGit/revert_lint_changes_again
Revert lint changes again
This commit is contained in:
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -1,2 +1,2 @@
|
|||||||
# These owners will be the default owners for everything in the repo
|
# These owners will be the default owners for everything in the repo
|
||||||
* @stea9499 @ColemanRoo @mrubens
|
* @stea9499 @ColemanRoo @mrubens @cte
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export const ChatRowContent = ({
|
|||||||
}
|
}
|
||||||
}, [isLast, message.say])
|
}, [isLast, message.say])
|
||||||
const [cost, apiReqCancelReason, apiReqStreamingFailedMessage] = useMemo(() => {
|
const [cost, apiReqCancelReason, apiReqStreamingFailedMessage] = useMemo(() => {
|
||||||
if (message.text && message.say === "api_req_started") {
|
if (message.text != null && message.say === "api_req_started") {
|
||||||
const info: ClineApiReqInfo = JSON.parse(message.text)
|
const info: ClineApiReqInfo = JSON.parse(message.text)
|
||||||
return [info.cost, info.cancelReason, info.streamingFailedMessage]
|
return [info.cost, info.cancelReason, info.streamingFailedMessage]
|
||||||
}
|
}
|
||||||
@@ -183,28 +183,26 @@ export const ChatRowContent = ({
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
return [
|
return [
|
||||||
apiReqCancelReason ? (
|
apiReqCancelReason != null ? (
|
||||||
apiReqCancelReason === "user_cancelled" ? (
|
apiReqCancelReason === "user_cancelled" ? (
|
||||||
getIconSpan("error", cancelledColor)
|
getIconSpan("error", cancelledColor)
|
||||||
) : (
|
) : (
|
||||||
getIconSpan("error", errorColor)
|
getIconSpan("error", errorColor)
|
||||||
)
|
)
|
||||||
) : cost ? (
|
) : cost != null ? (
|
||||||
getIconSpan("check", successColor)
|
getIconSpan("check", successColor)
|
||||||
) : apiRequestFailedMessage ? (
|
) : apiRequestFailedMessage ? (
|
||||||
getIconSpan("error", errorColor)
|
getIconSpan("error", errorColor)
|
||||||
) : (
|
) : (
|
||||||
<ProgressIndicator />
|
<ProgressIndicator />
|
||||||
),
|
),
|
||||||
apiReqCancelReason ? (
|
apiReqCancelReason != null ? (
|
||||||
apiReqCancelReason === "user_cancelled" ? (
|
apiReqCancelReason === "user_cancelled" ? (
|
||||||
<span style={{ color: normalColor, fontWeight: "bold" }}>API Request Cancelled</span>
|
<span style={{ color: normalColor, fontWeight: "bold" }}>API Request Cancelled</span>
|
||||||
) : (
|
) : (
|
||||||
<span style={{ color: errorColor, fontWeight: "bold" }}>
|
<span style={{ color: errorColor, fontWeight: "bold" }}>API Streaming Failed</span>
|
||||||
API Streaming Failed ({JSON.stringify(apiReqCancelReason)})
|
|
||||||
</span>
|
|
||||||
)
|
)
|
||||||
) : cost ? (
|
) : cost != null ? (
|
||||||
<span style={{ color: normalColor, fontWeight: "bold" }}>API Request</span>
|
<span style={{ color: normalColor, fontWeight: "bold" }}>API Request</span>
|
||||||
) : apiRequestFailedMessage ? (
|
) : apiRequestFailedMessage ? (
|
||||||
<span style={{ color: errorColor, fontWeight: "bold" }}>API Request Failed</span>
|
<span style={{ color: errorColor, fontWeight: "bold" }}>API Request Failed</span>
|
||||||
@@ -512,7 +510,9 @@ export const ChatRowContent = ({
|
|||||||
style={{
|
style={{
|
||||||
...headerStyle,
|
...headerStyle,
|
||||||
marginBottom:
|
marginBottom:
|
||||||
(!cost && apiRequestFailedMessage) || apiReqStreamingFailedMessage ? 10 : 0,
|
(cost == null && apiRequestFailedMessage) || apiReqStreamingFailedMessage
|
||||||
|
? 10
|
||||||
|
: 0,
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
userSelect: "none",
|
userSelect: "none",
|
||||||
@@ -524,13 +524,13 @@ export const ChatRowContent = ({
|
|||||||
<div style={{ display: "flex", alignItems: "center", gap: "10px", flexGrow: 1 }}>
|
<div style={{ display: "flex", alignItems: "center", gap: "10px", flexGrow: 1 }}>
|
||||||
{icon}
|
{icon}
|
||||||
{title}
|
{title}
|
||||||
<VSCodeBadge style={{ opacity: cost ? 1 : 0 }}>
|
<VSCodeBadge style={{ opacity: cost != null && cost > 0 ? 1 : 0 }}>
|
||||||
${Number(cost || 0)?.toFixed(4)}
|
${Number(cost || 0)?.toFixed(4)}
|
||||||
</VSCodeBadge>
|
</VSCodeBadge>
|
||||||
</div>
|
</div>
|
||||||
<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
|
<span className={`codicon codicon-chevron-${isExpanded ? "up" : "down"}`}></span>
|
||||||
</div>
|
</div>
|
||||||
{((!cost && apiRequestFailedMessage) || apiReqStreamingFailedMessage) && (
|
{((cost == null && apiRequestFailedMessage) || apiReqStreamingFailedMessage) && (
|
||||||
<>
|
<>
|
||||||
<p style={{ ...pStyle, color: "var(--vscode-errorForeground)" }}>
|
<p style={{ ...pStyle, color: "var(--vscode-errorForeground)" }}>
|
||||||
{apiRequestFailedMessage || apiReqStreamingFailedMessage}
|
{apiRequestFailedMessage || apiReqStreamingFailedMessage}
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
const lastApiReqStarted = findLast(modifiedMessages, (message) => message.say === "api_req_started")
|
const lastApiReqStarted = findLast(modifiedMessages, (message) => message.say === "api_req_started")
|
||||||
if (lastApiReqStarted && lastApiReqStarted.text && lastApiReqStarted.say === "api_req_started") {
|
if (lastApiReqStarted && lastApiReqStarted.text != null && lastApiReqStarted.say === "api_req_started") {
|
||||||
const cost = JSON.parse(lastApiReqStarted.text).cost
|
const cost = JSON.parse(lastApiReqStarted.text).cost
|
||||||
if (cost === undefined) {
|
if (cost === undefined) {
|
||||||
// api request has not finished yet
|
// api request has not finished yet
|
||||||
@@ -718,9 +718,9 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie
|
|||||||
if (message.say === "api_req_started") {
|
if (message.say === "api_req_started") {
|
||||||
// get last api_req_started in currentGroup to check if it's cancelled. If it is then this api req is not part of the current browser session
|
// get last api_req_started in currentGroup to check if it's cancelled. If it is then this api req is not part of the current browser session
|
||||||
const lastApiReqStarted = [...currentGroup].reverse().find((m) => m.say === "api_req_started")
|
const lastApiReqStarted = [...currentGroup].reverse().find((m) => m.say === "api_req_started")
|
||||||
if (lastApiReqStarted?.text) {
|
if (lastApiReqStarted?.text != null) {
|
||||||
const info = JSON.parse(lastApiReqStarted.text)
|
const info = JSON.parse(lastApiReqStarted.text)
|
||||||
const isCancelled = info.cancelReason !== null
|
const isCancelled = info.cancelReason != null
|
||||||
if (isCancelled) {
|
if (isCancelled) {
|
||||||
endBrowserSession()
|
endBrowserSession()
|
||||||
result.push(message)
|
result.push(message)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const WelcomeView = () => {
|
|||||||
|
|
||||||
const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
|
const [apiErrorMessage, setApiErrorMessage] = useState<string | undefined>(undefined)
|
||||||
|
|
||||||
const disableLetsGoButton = !!apiErrorMessage
|
const disableLetsGoButton = apiErrorMessage != null
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
vscode.postMessage({ type: "apiConfiguration", apiConfiguration })
|
vscode.postMessage({ type: "apiConfiguration", apiConfiguration })
|
||||||
|
|||||||
Reference in New Issue
Block a user