Chat: - DTK2 窗口:左侧会话列表 + 右侧对话区 + 输入框 - DeepSeek / 自定义 API,SSE 流式输出,首字即显示 - 会话持久化到 chat.json,新建/切换/标题自动生成 - 设置对话框:API Key、API 地址、模型、系统提示,含开通指引 - 拖放:左侧空白=新建对话,左侧会话=指定会话,右侧对话区=当前会话 - Ctrl+Enter 发送,错误以消息形式回显 Todo: - 待办窗口(layer-shell,不抢焦点、不进 dock),复选框/删除/新建 - 待办持久化 todo.json,--todo 打开,独立 desktop 入口 其他: - desktop 入口改为打开对话窗口,--chat 参数 - 单实例消息支持 show/todo/chat
81 lines
2.2 KiB
CMake
81 lines
2.2 KiB
CMake
cmake_minimum_required(VERSION 3.20)
|
|
|
|
project(gxde-ai-see
|
|
VERSION 0.1.0
|
|
DESCRIPTION "GXDE AI See - 小埃同学"
|
|
LANGUAGES CXX
|
|
)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTORCC ON)
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Network DBus Svg)
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(DTK2WIDGET REQUIRED dtk2widget)
|
|
pkg_check_modules(ICU REQUIRED icu-i18n icu-uc)
|
|
find_package(LayerShellQt QUIET)
|
|
|
|
set(GXDE_AI_SEE_SOURCES
|
|
src/main.cpp
|
|
src/app.cpp
|
|
src/config.cpp
|
|
src/staging/stagingmodel.cpp
|
|
src/portal/portalclient.cpp
|
|
src/factory/linktools.cpp
|
|
src/factory/contentclassifier.cpp
|
|
src/factory/factoryactions.cpp
|
|
src/factory/contentfactory.cpp
|
|
src/actions/downloader.cpp
|
|
src/actions/texttools.cpp
|
|
src/todo/todomodel.cpp
|
|
src/todo/todowindow.cpp
|
|
src/chat/chatclient.cpp
|
|
src/chat/chatwindow.cpp
|
|
src/ui/portalpanel.cpp
|
|
)
|
|
|
|
add_executable(gxde-ai-see ${GXDE_AI_SEE_SOURCES})
|
|
|
|
target_include_directories(gxde-ai-see PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
${DTK2WIDGET_INCLUDE_DIRS}
|
|
${ICU_INCLUDE_DIRS}
|
|
)
|
|
|
|
target_link_libraries(gxde-ai-see PRIVATE
|
|
Qt6::Core
|
|
Qt6::Gui
|
|
Qt6::Widgets
|
|
Qt6::Network
|
|
Qt6::DBus
|
|
Qt6::Svg
|
|
${DTK2WIDGET_LIBRARIES}
|
|
${ICU_LIBRARIES}
|
|
)
|
|
|
|
target_link_directories(gxde-ai-see PRIVATE ${DTK2WIDGET_LIBRARY_DIRS})
|
|
|
|
if (LayerShellQt_FOUND)
|
|
target_link_libraries(gxde-ai-see PRIVATE LayerShellQt::Interface)
|
|
target_compile_definitions(gxde-ai-see PRIVATE GXDE_HAVE_LAYERSHELLQT=1)
|
|
endif ()
|
|
|
|
add_executable(gxde-ai-see-selftest
|
|
tests/selftest.cpp
|
|
src/factory/linktools.cpp
|
|
src/factory/contentclassifier.cpp
|
|
src/factory/factoryactions.cpp
|
|
src/actions/texttools.cpp
|
|
)
|
|
target_include_directories(gxde-ai-see-selftest PRIVATE src ${ICU_INCLUDE_DIRS})
|
|
target_link_libraries(gxde-ai-see-selftest PRIVATE Qt6::Core Qt6::Gui ${ICU_LIBRARIES})
|
|
|
|
install(TARGETS gxde-ai-see RUNTIME DESTINATION bin)
|
|
install(FILES data/gxde-ai-see.desktop data/gxde-ai-see-todo.desktop DESTINATION share/applications)
|
|
install(DIRECTORY data/icons/ DESTINATION share/icons/hicolor)
|
|
|
|
include(GNUInstallDirs)
|