mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 17:27:54 +00:00
chore(vscode-ide-companion): refactor directory structure
This commit is contained in:
@@ -73,7 +73,9 @@ export const useMessageHandling = () => {
|
||||
const appendStreamChunk = useCallback(
|
||||
(chunk: string) => {
|
||||
// Ignore late chunks after user cancelled streaming (until next streamStart)
|
||||
if (!isStreaming) return;
|
||||
if (!isStreaming) {
|
||||
return;
|
||||
}
|
||||
|
||||
setMessages((prev) => {
|
||||
let idx = streamingMessageIndexRef.current;
|
||||
@@ -157,7 +159,9 @@ export const useMessageHandling = () => {
|
||||
// Thought handling
|
||||
appendThinkingChunk: (chunk: string) => {
|
||||
// Ignore late thoughts after user cancelled streaming
|
||||
if (!isStreaming) return;
|
||||
if (!isStreaming) {
|
||||
return;
|
||||
}
|
||||
setMessages((prev) => {
|
||||
let idx = thinkingMessageIndexRef.current;
|
||||
const next = prev.slice();
|
||||
|
||||
@@ -59,7 +59,9 @@ export const useSessionManagement = (vscode: VSCodeAPI) => {
|
||||
}, [vscode]);
|
||||
|
||||
const handleLoadMoreSessions = useCallback(() => {
|
||||
if (!hasMore || isLoading || nextCursor === undefined) return;
|
||||
if (!hasMore || isLoading || nextCursor === undefined) {
|
||||
return;
|
||||
}
|
||||
setIsLoading(true);
|
||||
vscode.postMessage({
|
||||
type: 'getQwenSessions',
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import type { RefObject } from 'react';
|
||||
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
||||
import type { CompletionItem } from '../types/CompletionTypes.js';
|
||||
import type { CompletionItem } from '../../types/completionItemTypes.js';
|
||||
|
||||
interface CompletionTriggerState {
|
||||
isOpen: boolean;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
import { useState, useCallback } from 'react';
|
||||
import type { ToolCallData } from '../components/ToolCall.js';
|
||||
import type { ToolCallUpdate } from '../types/toolCall.js';
|
||||
import type { ToolCallData } from '../components/messages/toolcalls/ToolCall.js';
|
||||
import type { ToolCallUpdate } from '../../types/qwenTypes.js';
|
||||
|
||||
/**
|
||||
* Tool call management Hook
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
import { useEffect, useRef, useCallback } from 'react';
|
||||
import { useVSCode } from './useVSCode.js';
|
||||
import type { Conversation } from '../../storage/conversationStore.js';
|
||||
import type { Conversation } from '../../services/conversationStore.js';
|
||||
import type {
|
||||
PermissionOption,
|
||||
ToolCall as PermissionToolCall,
|
||||
} from '../components/PermissionDrawer/PermissionRequest.js';
|
||||
import type { ToolCallUpdate, EditMode } from '../types/toolCall.js';
|
||||
import type { PlanEntry } from '../../agents/qwenTypes.js';
|
||||
import type { ToolCallUpdate, EditMode } from '../../types/qwenTypes.js';
|
||||
import type { PlanEntry } from '../../types/qwenTypes.js';
|
||||
|
||||
interface UseWebViewMessagesProps {
|
||||
// Session management
|
||||
|
||||
Reference in New Issue
Block a user