* fix(app): open chat file links at referenced lines Pass chat file locations through the editable CodeMirror path so opening a reference selects and scrolls to its requested line. Cover the real assistant-link flow with a browser regression. * fix(app): repeat chat file navigation Track file navigation separately from stable tab identity so reopening the same path and line recenters both editable and read-only panes. Extend the browser regression to cover moving away and clicking the same link again. * test(app): stabilize repeated file link navigation
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { Text, View } from "react-native";
|
|
import { StyleSheet } from "react-native-unistyles";
|
|
import type { HighlightStyle } from "@getpaseo/highlight";
|
|
import type { WorkspaceFileLocation } from "@/workspace/file-open";
|
|
import type { FileEditorModel } from "./model";
|
|
|
|
export function FileEditorView(_props: {
|
|
model: FileEditorModel;
|
|
filename: string;
|
|
location: WorkspaceFileLocation;
|
|
navigationRevision: number;
|
|
vimEnabled: boolean;
|
|
theme: {
|
|
background: string;
|
|
foreground: string;
|
|
foregroundMuted: string;
|
|
border: string;
|
|
selection: string;
|
|
monoFont: string;
|
|
codeFontSize: number;
|
|
syntax: Record<HighlightStyle, string>;
|
|
};
|
|
onCursorChange(position: { line: number; column: number }): void;
|
|
onVimModeChange(mode: string | null): void;
|
|
}) {
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.text}>Source editing is available on web and desktop.</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create((theme) => ({
|
|
container: { flex: 1, alignItems: "center", justifyContent: "center" },
|
|
text: { color: theme.colors.foregroundMuted, fontSize: theme.fontSize.sm },
|
|
}));
|